OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: alternate sendmail binary for sieve redirect OT

From: Robert Schetterer (robertschetterer.org)
Date: Fri Nov 12 2010 - 13:43:32 CST


Am 12.11.2010 19:08, schrieb mouss:
> Le 12/11/2010 16:01, Robert Schetterer a écrit :
>> Am 12.11.2010 15:24, schrieb Jeroen Geilman:
>>> On 11/12/2010 03:19 PM, Robert Schetterer wrote:
>>>> Hi , this isnt really a dovecot/postfix question
>>>> in dove lda, there is sendmail_path =
>>>> someone tried other progs here like mini_sendmail ?
>>>>
>>>> http://www.acme.com/software/mini_sendmail/
>>>>
>>>> i.e for using a default from forwarder address when sending
>>>> redirects by
>>>> sieve....is a stupid idea?
>>>>
>
>
> the devil is in the details: what happens if the wrapper can't send
> mail? will mail be lost? if not, will the right error be returned (so
> that the calling MTA knows whether to bounce or to retry)?
>
> the advantage with a real MTA (Sendmail, postfix, ...) is that the
> associated sendmail command will take responsibility for the message: if
> the message can't be sent now, it will be queued and sent later.
>
>
> you can certainly write an smtp client that is run by your sieve script.
> it should return a "correct" error if it fails (by correct, I mean: temp
> error if the error is temporary, fatal otherwise. better get this right.
> if unsure, forget about this story and use the usual tools, which
> already implement all this stuff correctly!). you also need to avoid
> creatin infinite loops. .. etc. at some point, you'll need to see if the
> little performance gain is worth all this trouble.
>
>
>>>>
>>>
>>> I don't know about stupid, but since postfix comes with its own sendmail
>>> binary which is option-compatible with the original sendmail, why
>>> bother ?
>>>
>>>> background, some other mail providers use a default sender forwarder
>>>> mailaddress when redirect
>>>> this may avoid problems at forwarding with spf etc
>>>>
>>>> any other idea to reach this goal, pipe etc?
>>>>
>>> Just re-inject back to postfix, over a different socket if you like,
>>> yes.
>>> That way you can circumvent the normal checks done on mail submission
>>> via sendmail (there aren't many though).
>>>
>>>
>> hm, maybe a wrapper for postfix senmail is enough to set a default from
>> address , i see i have to study man pages, dont know if this is possible
>> yet, i dont see how reinject with sendmail yet ...
>>
>
> the "general" syntax is
> sendmail -f sender rcpt1 rcpt2 ... < messagefile
>
> but I have no idea how to run this from a dovecot sieve script...

the clean way would be sieve redirect/forward as attachment
but as far i googled this isnt implemented yet

i investigate now using enotify sieve with attachment orginal mail is
possible
--
Best Regards
MfG Robert Schetterer