Kendall Gifford
2010-Sep-24 17:55 UTC
[Dovecot] LDA + Postfix + LDAP + Sieve (Vacation): Wrong Domain in Reply
Hello everyone. I'm running dovecot (1.2.9) with postfix (2.7.0) on an ubuntu 10.04.1. I'm hosting mail for several domains and using the dovecot local delivery agent. Everything has been working great. However, today I set up a sieve script to send out-of-office replies (vacation) for one of our users. I tested it and got the response just fine. However, when looking at the "From" header of the auto-reply, I noticed that the domain name was wrong. My postfix master.cf line for doing local delivery is: dovecot unix - n n - - pipe flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} My LDA configuration is: protocol lda { postmaster_address = postmaster at our-primary-domain.com hostname = our-primary-domain.com mail_plugins = sieve quota_full_tempfail = yes deliver_log_format = msgid=%m: %$ rejection_reason = Your message to <%t> was automatically rejected:%n%r } So, our main "administrative" domain is: my-primary-domain.com, the mail server being mail.my-primary-domain.com. I sent an email to a user: janedoe at my-other-domain.com and the LDA with Sieve successfully sent me a reply. However, the "From" was: janedoe at mail instead of janedoe at my-other-domain. According to: http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply> Vacation uses envelope sender and envelope recipient ... taken from: > ... > V 1.1+ > ... > Envelope recipient: -a parameter to deliver if given, otherwise -d parameter to deliver. If neither is given (delivering to system users), the $USER environment is used.Just for kicks I tried changing my master.cf to use -a instead of -d but then all mail delivers to user "mail" completely breaking all mail delivery. Anyhow, vacation auto-responders are fundamental to operations here and we manage mail for several separate companies. We need the "From" address to reflect the domain of the actual company. I'm stumped as to why sieve isn't getting/using the envelope sender's domain. I'm hoping someone here can point out (a hopefully obvious) mistake. I've attached my four pertinent config files as etc.tgz only slightly scrubbed. Any help is greatly appreciated. -- Kendall Gifford zettabyte at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: etc.tgz Type: application/x-gzip Size: 5475 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20100924/1f3ba37b/attachment-0002.tgz>
Cassidy Larson
2010-Sep-24 20:03 UTC
[Dovecot] LDA + Postfix + LDAP + Sieve (Vacation): Wrong Domain in Reply
I'd check your postfix main.cf config for something obvious. My hunch is that the dovecot process is handing off the reply message to your MTA with the correct from address (I'm actually using /usr/sbin/sendmail for outbound mails/replies) and the MTA is rewriting the from address. -c On Fri, Sep 24, 2010 at 11:55 AM, Kendall Gifford <zettabyte at gmail.com> wrote:> Hello everyone. > > I'm running dovecot (1.2.9) with postfix (2.7.0) on an ubuntu 10.04.1. > I'm hosting mail for several domains and using the dovecot local > delivery agent. Everything has been working great. > > However, today I set up a sieve script to send out-of-office replies > (vacation) for one of our users. I tested it and got the response just > fine. However, when looking at the "From" header of the auto-reply, I > noticed that the domain name was wrong. > > My postfix master.cf line for doing local delivery is: > > dovecot ? unix ?- ? ? ? n ? ? ? n ? ? ? - ? ? ? - ? ? ? pipe > ?flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} > -d ${user}@${nexthop} > > My LDA configuration is: > > protocol lda { > ?postmaster_address = postmaster at our-primary-domain.com > ?hostname = our-primary-domain.com > ?mail_plugins = sieve > ?quota_full_tempfail = yes > ?deliver_log_format = msgid=%m: %$ > ?rejection_reason = Your message to <%t> was automatically rejected:%n%r > } > > So, our main "administrative" domain is: my-primary-domain.com, the > mail server being mail.my-primary-domain.com. I sent an email to a > user: janedoe at my-other-domain.com and the LDA with Sieve successfully > sent me a reply. However, the "From" was: janedoe at mail instead of > janedoe at my-other-domain. > > According to: http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply > >> Vacation uses envelope sender and envelope recipient ... taken from: >> ... >> ? V 1.1+ >> ? ... >> ? ? Envelope recipient: -a parameter to deliver if given, otherwise -d parameter to deliver. If neither is given (delivering to system users), the $USER environment is used. > > Just for kicks I tried changing my master.cf to use -a instead of -d > but then all mail delivers to user "mail" completely breaking all mail > delivery. Anyhow, vacation auto-responders are fundamental to > operations here and we manage mail for several separate companies. We > need the "From" address to reflect the domain of the actual company. > I'm stumped as to why sieve isn't getting/using the envelope sender's > domain. I'm hoping someone here can point out (a hopefully obvious) > mistake. > > I've attached my four pertinent config files as etc.tgz only slightly scrubbed. > > Any help is greatly appreciated. > > -- > Kendall Gifford > zettabyte at gmail.com >
Jerry
2010-Sep-24 20:25 UTC
[Dovecot] LDA + Postfix + LDAP + Sieve (Vacation): Wrong Domain in Reply
On Fri, 24 Sep 2010 11:55:57 -0600 Kendall Gifford <zettabyte at gmail.com> articulated:> Hello everyone. > > I'm running dovecot (1.2.9) with postfix (2.7.0) on an ubuntu 10.04.1. > I'm hosting mail for several domains and using the dovecot local > delivery agent. Everything has been working great. > > However, today I set up a sieve script to send out-of-office replies > (vacation) for one of our users. I tested it and got the response just > fine. However, when looking at the "From" header of the auto-reply, I > noticed that the domain name was wrong. > > My postfix master.cf line for doing local delivery is: > > dovecot unix - n n - - pipe > flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} > -d ${user}@${nexthop} > > My LDA configuration is: > > protocol lda { > postmaster_address = postmaster at our-primary-domain.com > hostname = our-primary-domain.com > mail_plugins = sieve > quota_full_tempfail = yes > deliver_log_format = msgid=%m: %$ > rejection_reason = Your message to <%t> was automatically > rejected:%n%r } > > So, our main "administrative" domain is: my-primary-domain.com, the > mail server being mail.my-primary-domain.com. I sent an email to a > user: janedoe at my-other-domain.com and the LDA with Sieve successfully > sent me a reply. However, the "From" was: janedoe at mail instead of > janedoe at my-other-domain. > > According to: http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply > > > Vacation uses envelope sender and envelope recipient ... taken from: > > ... > > V 1.1+ > > ... > > Envelope recipient: -a parameter to deliver if given, otherwise > > -d parameter to deliver. If neither is given (delivering to system > > users), the $USER environment is used. > > Just for kicks I tried changing my master.cf to use -a instead of -d > but then all mail delivers to user "mail" completely breaking all mail > delivery. Anyhow, vacation auto-responders are fundamental to > operations here and we manage mail for several separate companies. We > need the "From" address to reflect the domain of the actual company. > I'm stumped as to why sieve isn't getting/using the envelope sender's > domain. I'm hoping someone here can point out (a hopefully obvious) > mistake. > > I've attached my four pertinent config files as etc.tgz only slightly > scrubbed. > > Any help is greatly appreciated. >You would save yourself a lot of trouble, and the results would be more accurate, if you simply provided output from the postfinger tool. This can be found at http://ftp.wl0.org/SOURCES/postfinger. This pertains to Postfix obviously. For dovecot, the usually excepted method is to use "dovecot -n". You can pipe the output to a file so you can share it. -- Jerry ? Dovecot.user at seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __________________________________________________________________
Seemingly Similar Threads
- Migration Issues: Can't update newly added column values
- vacation rule addresses
- Can not create model instance via params on specific model but can on others....
- Authenticity token error on Safari and IE6 on Windows
- Status of Rails.application.routes.recognize_path()