[Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.
Hi,
My problem is that when vacation auto-reply sent the field from=<> Because of this does not work "sender_dependent_relayhost_maps" in postfix.
My scheme is: There are several postfix on different machines 1.1.1.1 - domain1 2.2.2.2 - domain2 3.3.3.3 - domain3 All they send messages to one server virtual_transport = lmtp:10.10.10.10:24 where mail is stored. In 10.10.10.10 installed dovecot 2.2.9, dovecot-pigeonhole 0.4.2 and another posfix
In postfix inet_interfaces = 10.10.10.10 sender_dependent_relayhost_maps = hash:$config_directory/relayhost_maps
relayhost_maps @domain1 [1.1.1.1] @domain2 [2.2.2.2] @domain3 [3.3.3.3]
Sieve script make from Roundcube
require ["vacation"]; # rule:[autoreply] if true { vacation :days 1 :subject "Test." "Test."; }
(if add [":from" string] nothing changes)
The letter comes, script fulfills, vacation auto-reply sent. But either /usr/sbin/sendmail -i -f <> -- user@senddomain or, if write in 15-lda.conf submission_host = 10.10.10.10:25 postfix log Jan 1 00:00:00 mail pf-OUT/cleanup[6098]: 4CD104A8A4: message-id=<dovecot-sieve-1390316174-295666-0@mail> Jan 1 00:00:00 mail pf-OUT/qmgr[5950]: 4CD104A8A4: from=<>, size=693, nrcpt=1 (queue active)
How to make dovecot and dovecot-pigeonhole write in field MAIL FROM:?
Also, I noticed that does not work protocol lda { .. # remember to give proper permissions for these files as well log_path = /var/log/dovecot-lda-errors.log info_log_path = /var/log/dovecot-lda.log } from http://wiki2.dovecot.org/LDA Logs are not written.
Thanks and regards, Dmitry
Am 22.01.2014 13:39, schrieb Dmitry:
My problem is that when vacation auto-reply sent the field from=<> Because of this does not work "sender_dependent_relayhost_maps" in postfix
<> is correct in case of auto-responders
why? to prevent mail-loops if both sides have a responder
well, there are special headers too for this but they rely on be respected by the final destination while null sender never get bounces and replies
http://en.wikipedia.org/wiki/Bounce_message
Bounce messages in SMTP are sent with the envelope sender address <>, known as the null sender address. They are frequently sent with a From: header address of MAILER-DAEMON at the recipient site.
Thanks for your quick reply.
Can I least make dovecot write from=<MAILER-DAEMON@domain(1,2,3)>? How can I make "sender_dependent_relayhost_maps" works in postfix?
Best Regards Dmitry
On Wed, 22 Jan 2014 14:18:26 +0100 Reindl Harald <h.reindl@thelounge.net> wrote:
Am 22.01.2014 13:39, schrieb Dmitry:
My problem is that when vacation auto-reply sent the field from=<> Because of this does not work "sender_dependent_relayhost_maps" in postfix
<> is correct in case of auto-responders
why? to prevent mail-loops if both sides have a responder
well, there are special headers too for this but they rely on be respected by the final destination while null sender never get bounces and replies
http://en.wikipedia.org/wiki/Bounce_message
Bounce messages in SMTP are sent with the envelope sender address <>, known as the null sender address. They are frequently sent with a From: header address of MAILER-DAEMON at the recipient site.
do not mix the "From: header address of MAILER-DAEMON" with the envelope from=<MAILER-DAEMON@domain(1,2,3)> would be the problem described below why in the world do you need "sender_dependent_relayhost_maps" for vacation?
you should try to explain your problem and not how to implement a solution http://www.catb.org/~esr/faqs/smart-questions.html
Am 22.01.2014 15:39, schrieb Dmitry:
Thanks for your quick reply.
Can I least make dovecot write from=<MAILER-DAEMON@domain(1,2,3)>? How can I make "sender_dependent_relayhost_maps" works in postfix?
On Wed, 22 Jan 2014 14:18:26 +0100 Reindl Harald <h.reindl@thelounge.net> wrote:
Am 22.01.2014 13:39, schrieb Dmitry:
My problem is that when vacation auto-reply sent the field from=<> Because of this does not work "sender_dependent_relayhost_maps" in postfix
<> is correct in case of auto-responders
why? to prevent mail-loops if both sides have a responder
well, there are special headers too for this but they rely on be respected by the final destination while null sender never get bounces and replies
http://en.wikipedia.org/wiki/Bounce_message
Bounce messages in SMTP are sent with the envelope sender address <>, known as the null sender address. They are frequently sent with a From: header address of MAILER-DAEMON at the recipient site.
you should try to explain your problem and not how to implement a solution
Sorry. I know English bad. I tried to describe the problem in the first letter. I'll try again.
My Dovecot receive mail from many different domains (around 30) from many different machines. 1.1.1.1 - domain1 2.2.2.2 - domain2 3.3.3.3 - domain3 ... with different postfix with virtual_transport = lmtp:10.10.10.10:24 in their main.cf 10.10.10.10 - machine with my dovecot.
Users imap - 10.10.10.10:143 User smtp - 10.10.10.10:25 10.10.10.10:25 - postfix with sender_dependent_relayhost_maps = hash:$config_directory/relayhost_maps
in relayhost_maps @domain1 [1.1.1.1] @domain2 [2.2.2.2] @domain3 [3.3.3.3]
for example user@domain2 receive mail: inet -> 2.2.2.2:25 -> 10.10.10.10:24 -> saved to disk user@domain2 connect to 10.10.10.10:143 and read it.
for example user@domain2 sends mail: user@domain2 connect to 10.10.10.10:25 because in relayhost_maps written @domain2 [2.2.2.2] postfix sends it in 2.2.2.2 10.10.10.10:25 -> 2.2.2.2:25 -> inet
Everything works fine until the case comes to vacation auto-reply with dovecot-pigeonhole plugin :( Because the domain of the sender is unknown, postfix 10.10.10.10 does not understand where to forward mail. Where relay for domain2.
I do not know what to do ...
On Wed, 22 Jan 2014 15:46:52 +0100 Reindl Harald <h.reindl@thelounge.net> wrote:
do not mix the "From: header address of MAILER-DAEMON" with the envelope from=<MAILER-DAEMON@domain(1,2,3)> would be the problem described below why in the world do you need "sender_dependent_relayhost_maps" for vacation?
you should try to explain your problem and not how to implement a solution http://www.catb.org/~esr/faqs/smart-questions.html
Am 22.01.2014 15:39, schrieb Dmitry:
Thanks for your quick reply.
Can I least make dovecot write from=<MAILER-DAEMON@domain(1,2,3)>? How can I make "sender_dependent_relayhost_maps" works in postfix?
On Wed, 22 Jan 2014 14:18:26 +0100 Reindl Harald <h.reindl@thelounge.net> wrote:
Am 22.01.2014 13:39, schrieb Dmitry:
My problem is that when vacation auto-reply sent the field from=<> Because of this does not work "sender_dependent_relayhost_maps" in postfix
<> is correct in case of auto-responders
why? to prevent mail-loops if both sides have a responder
well, there are special headers too for this but they rely on be respected by the final destination while null sender never get bounces and replies
http://en.wikipedia.org/wiki/Bounce_message
Bounce messages in SMTP are sent with the envelope sender address <>, known as the null sender address. They are frequently sent with a From: header address of MAILER-DAEMON at the recipient site.
Zitat von Dmitry <rcpt.dmitry@gmail.com>:
Users imap - 10.10.10.10:143 User smtp - 10.10.10.10:25 10.10.10.10:25 - postfix with sender_dependent_relayhost_maps = hash:$config_directory/relayhost_maps
Dmitry,
just an untested idea:
leave the RFC5321.MAILFROM empty. That's fine as it avoid loops. let the user set a RFC5322.From via sieve:
vacation :addresses "user@domain1 :from "user@domain1" "vacation message"
Now you could filter using header_checks
(http://www.postfix.org/header_checks.5.html)
/From: .*@domain1/ FILTER transport1:[1.1.1.1]
...
Andreas
Now you could filter using header_checks
(http://www.postfix.org/header_checks.5.html) /From: .*@domain1/ FILTER transport1:[1.1.1.1]
Big thanks for idea! I don't really like it, but I have not found anything better...
I made 10025 inet n - n - - smtpd -o cleanup_service_name=clup_ar clup_ar unix n - n - 0 cleanup -o header_checks=regexp:/etc/postfix/header_checks in postfix for auto-reply submission_host = 10.10.10.10:10025 in dovecot and this really work
Best Regards Dmitry
participants (3)
-
Andreas Schulze
-
Dmitry
-
Reindl Harald