_smf_ thanks. wasn't able to check until now, but i'll look into it
_smf_
ttk: yw
ttk
_smf_ i have already managed to rewrite it a little to acquire more than a catch-all, and now also the rspamd integration succeeds (which wasnt possible with the previous plugin).
But one last question: What is the difference between return next() and return next(OK)? I suppose when returning OK explicitly the queue ends, and if returning next without any arguments, the next plugin in the queue starts to process the email?
_smf_
ttk: next() is the callback function - it tells Haraka what to do.
next() === next(CONT) which means, continue to the next plugin on the hook. Think of it as the plugin saying that it didn't need to do any work.
next(OK) = means that Haraka should return an OK state to the SMTP client and remaining plugins on the same hook will not be called.
What next(OK) .vs. next() means in the case of the SMTP transaction depends on the hook that it is being called on.
Haraka requires that at least one plugin *must* call next(OK) for each valid recipient.
And a plugin *must* call next(OK) in hook_queue once it has actually queued the mail.
However in the plugin I wrote for you, we skip this part as we set connection.relaying which forces Haraka to use hook_queue_outbound instead, so it does the delivery instead of a hook_queue plugin.
Hope that clears it up for you.
ttk
It does. I was asking because your Plugin processed inbound mails easily, but didn't manage to process outbound mails. Turns out it denied any mails it had no idea how to forward them.
But I think I managed it. At least it's working now. Let's hope I didn't open up the server too much :)
_smf_
ttk: outbound mails? How are you injecting those?
The absolute simplest way would be to use one of the auth plugins.
Alternatively - you use the relay plugin to allow relaying for the IP address you're sending from.
And the reason they didn't work is what I explained above.
A regular message coming in to Haraka will go to hook_queue - which has no handler on it by default.
However if a plugin sets connection.relaying on the connection, then it goes via hook_queue_outbound and Haraka will handle the delivery by looking up the MX etc.
ttk
I have plain Auth enabled and submit outbound mails on port 587 with Auth. However, for some reason, the Plugin hooks on these mails as well, and is switching to the if branch with "DENY, could not process" when I submit the mail.
_smf_
Oh - right. You'll need to change my plugin to return next(); instead of next(DENY);
EyePulp joined the channel
EyePulp joined the channel
EyePulp joined the channel
EyePulp has quit
EyePulp joined the channel
miller7 has quit
EyePulp has quit
EyePulp joined the channel
EyePulp joined the channel
EyePulp joined the channel
aaaaaa joined the channel
aaaaaa
hi - I'm having trouble getting outbound email working and have spent a good 6 hours learning how this works and troubleshooting - still getting this error:
[ERROR] [6E453264-61DE-4321-9F52-68005AA3F8FA.1.1] [outbound] Remote end 173.194.204.27:25 closed connection while we were processing mail. Trying next MX.
baudehlo
The remote end is buggy.
aaaaaa
eek - it's gmail though
I'm just trying to send an email using swaks to my personal gmail account