Hi:

I am hoping I can ask for suggestions or pointers to help solve this challenge.

I am trying to implement an autoreply capability. I am putting together a script that will handle the messages.

Many of the autoreply examples I've found suggest implementing this by:

main.cf:
   always_bcc = autoreply

local_alias_maps:
   autoreply  '|/path/to/autoreply/script'

effectively causing all mail sent to anyone to be bcc'ed to the script, which then determines if an autoreply needs to be sent. This also ensures that delivery to the intended recipient (in my case, they are all virtual mailboxes) will also happen.

However, as I started to test this, I discovered a limitation that I am having difficulty finding a solution for. The scenario is that one user on one domain that I host sends mail to another user at another domain that I host. The recipient has autoreply "turned on" in my script. However, according to http://www.postfix.com/ADDRESS_REWRITING_README.html :

"To avoid mailer loops, automatic BCC recipients are not generated for mail that Postfix forwards internally"

and the actual behavior matches that statement.

So my question:

Is there another mechanism I can use to send the mail to the script without interfering with normal mail delivery in all cases , including this internally forwarded mail?

Or, is there another way to handle autoreplies that anyone can suggest or point me to that avoids this issue?

(I don't want all mail forwarded to the script, as I do not want to - and am not sufficiently proficient to - handle reinjection into postfix and the associated handling of SMTP/LMTP protocol)

Thank you very much for any help or pointers you can offer!

Reply via email to