Mailing List Archive

Vacation mail does not work if mail is forwarded to mailbox
Hi all,



I've been trying to setup a simple vacation autoresponder. The responder
works perfectly when we directly send a mail to the "vacation" mailbox. In
our particular case we make use of autoresponders for a testmail feature. We
have a central testmail mailbox (not the vacation mailbox) which when a mail
is sent to it, will forward the mail to another mailbox (in this case the
vacation mailbox), and upon autoresponse we can determine whether our mail
facility outside of our own primary server.



In my tests I am able to get a vacation / autoresponse mail returned when I
send a mail directly to the "vacation" mailbox, but when we send an email to
our testmail which then forwards the mail to the vacation mailbox, the mail
is received in the vacation mailbox but it appears that the Router is not
satisfied and "Transport" is never called. I have fiddled with this but
cannot figure out why this is happening. In both cases the mailbox which
sends the mail to the vacation mailbox is the same (my email address) and
from the exim logs there are nothing separating the 2 incoming mails, but
only 1 mail gets the vacation mail autoresponder.



I however know that this works as we have a couple of other mailboxes at
other providers (1 cPanel and 1 gmail) with autoresponders setup and those
mails arrive each time, so it's definitely something on my end.



Here is my config and sample logs from exim:



# ROUTER:

uservacation:

driver = redirect

hide_child_in_errmsg

ignore_eacces

ignore_enotdir

allow_filter

user = testmail

group = testmail

file = /home/$local_part/vacation.msg

require_files = /home/$local_part/vacation.msg

reply_transport = uservacation_transport

unseen

no_verify



# TRANSPORT:

uservacation_transport:

driver = autoreply

user = testmail

group = testmail

file = /home/$local_part/vacation.msg

file_expand

once = /home/$local_part/vacation.db

once_repeat = 1h

from = testmail@ourdomain.com

to = ${sender_address}

subject = "We have received your testmail!"



# LOGS FROM EXIM WHERE I MAILED TO THE VACATION MAILBOX DIRECTLY:

2018-10-26 15:27:34 1gG29F-0007Ys-UU DKIM: d=*** t s=default
c=relaxed/relaxed a=rsa-sha256 b=2048 [verification succeeded]

2018-10-26 15:27:34 1gG29F-0007Ys-UU <= mymailbox@example.com
H=mx6-out12.my.com [***] P=esmtps X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
CV=no K S=68305 id=008001d46d2f$9f64f070$de2ed150$@***

2018-10-26 15:27:34 1gG29F-0007Ys-UU => testmail <testmail@ourdomain.com>
R=localuser T=local_delivery

2018-10-26 15:27:34 1gG29G-0007Yy-7K <= <> R=1gG29F-0007Ys-UU U=testmail
P=local S=774

2018-10-26 15:27:34 1gG29F-0007Ys-UU => > mymailbox@example.com
(testmail@ourdomain.com) <testmail@ourdomain.com > R=uservacation2
T=uservacation_transport

2018-10-26 15:27:34 1gG29F-0007Ys-UU Completed

2018-10-26 15:27:35 1gG29G-0007Yy-7K => mymailbox@example.com R=dnslookup
T=remote_smtp H=mx.my.com [***] X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
CV=yes C="250 OK id=1gG29F-0001d6-Vu"

2018-10-26 15:27:35 1gG29G-0007Yy-7K Completed



# LOGS FROM EXIM WHERE THE MAIL WAS FORWARDED TO THE VACATION MAILBOX (BUT
FROM SAME ACCOUNT)

2018-10-26 15:27:41 1gG29N-0007ZG-1F DKIM: d=*** s=default c=relaxed/relaxed
a=rsa-sha256 b=2048 [verification succeeded]

2018-10-26 15:27:41 1gG29N-0007ZG-1F <= mymailbox@example.com
H=mx12-out3.my.com [***] P=esmtps X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
CV=no K S=68355 id=008f01d46d2f$a6a48f80$f3edae80$@***

2018-10-26 15:27:41 1gG29N-0007ZG-1F => testmail <testmail@ourdomain.com>
R=localuser T=local_delivery

2018-10-26 15:27:41 1gG29N-0007ZG-1F Completed



Anyone able to see what I'm doing wrong?

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Vacation mail does not work if mail is forwarded to mailbox [ In reply to ]
On 2018-10-26 15:37, Mauritz Swanepoel via Exim-users wrote:

> # LOGS FROM EXIM WHERE THE MAIL WAS FORWARDED TO THE VACATION MAILBOX (BUT
> FROM SAME ACCOUNT)
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F DKIM: d=*** s=default c=relaxed/relaxed
> a=rsa-sha256 b=2048 [verification succeeded]
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F <= mymailbox@example.com
> H=mx12-out3.my.com [***] P=esmtps X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
> CV=no K S=68355 id=008f01d46d2f$a6a48f80$f3edae80$@***
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F => testmail <testmail@ourdomain.com>
> R=localuser T=local_delivery
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F Completed

Unless I'm badly mistaken, this shows the mail has not been forwarded to
the "vacation" account at all, but delivered to "testmail". IOW the
forwarding part of your configuration (which you have not shown) is to
blame for not reaching the expected result.

--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Vacation mail does not work if mail is forwarded to mailbox [ In reply to ]
Thank you Ian,

Just to be sure, in my logs below testmail@ourdomain.com is the actual vacation mailbox. Any emails sent to that address should send a vacation mail. My tests below was:

1. Send a mail directly to testmail@ourdomain.com from mymailbox@example.com via Outlook.
2. Send a mail to testmail@otherdomain.com from mymailbox@example.com via Outlook which in return will forward my mail to testmail@ourdomain.com. In both logs below only mymailbox@example.com is shown as intended (as we want the mail to "originate" from my mailbox and not the forward account).

Point 1 works perfectly, point 2 does deliver the mail to the testmail@ourdomain.com mailbox (the vacation mailbox) but simply does not send trigger the vacation mail router.

I cannot show you the forward config as that is setup via cPanel. The actual testmail account is setup on a cPanel server so not entirely sure how to extract that config but can confirm it's working.

Thank you again for your willingness to help ????

Mauritz

-----Original Message-----
From: Exim-users <exim-users-bounces+mauritz=intelli.host@exim.org> On Behalf Of Ian Zimmerman via Exim-users
Sent: Saturday, October 27, 2018 5:09 PM
To: exim-users@exim.org
Subject: Re: [exim] Vacation mail does not work if mail is forwarded to mailbox

On 2018-10-26 15:37, Mauritz Swanepoel via Exim-users wrote:

> # LOGS FROM EXIM WHERE THE MAIL WAS FORWARDED TO THE VACATION MAILBOX
> (BUT FROM SAME ACCOUNT)
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F DKIM: d=*** s=default
> c=relaxed/relaxed
> a=rsa-sha256 b=2048 [verification succeeded]
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F <= mymailbox@example.com
> H=mx12-out3.my.com [***] P=esmtps
> X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
> CV=no K S=68355 id=008f01d46d2f$a6a48f80$f3edae80$@***
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F => testmail
> <testmail@ourdomain.com> R=localuser T=local_delivery
>
> 2018-10-26 15:27:41 1gG29N-0007ZG-1F Completed

Unless I'm badly mistaken, this shows the mail has not been forwarded to the "vacation" account at all, but delivered to "testmail". IOW the forwarding part of your configuration (which you have not shown) is to blame for not reaching the expected result.

--
Please don't Cc: me privately on mailing lists and Usenet, if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists which rewrite From, fetch the TXT record for no-use.mooo.com.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Vacation mail does not work if mail is forwarded to mailbox [ In reply to ]
On 2018-10-29, Mauritz Swanepoel via Exim-users <exim-users@exim.org> wrote:
> Thank you Ian,
>
> Just to be sure, in my logs below testmail@ourdomain.com is the actual vacation mailbox. Any emails sent to that address should send a vacation mail. My tests below was:
>
> 1. Send a mail directly to testmail@ourdomain.com from mymailbox@example.com via Outlook.
> 2. Send a mail to testmail@otherdomain.com from mymailbox@example.com via Outlook which in return will forward my mail to testmail@ourdomain.com. In both logs below only mymailbox@example.com is shown as intended (as we want the mail to "originate" from my mailbox and not the forward account).
>
> Point 1 works perfectly, point 2 does deliver the mail to the testmail@ourdomain.com mailbox (the vacation mailbox) but simply does not send trigger the vacation mail router.
>
> I cannot show you the forward config as that is setup via cPanel. The actual testmail account is setup on a cPanel server so not entirely sure how to extract that config but can confirm it's working.
>
> Thank you again for your willingness to help ????

assuming vacation is https://www.unix.com/man-page/all/1/vacation/
it relies on .forward processing to operate so the transport for your
mail must in all cases include .forward processing.

also vacation checks the to header and does not respond if it thinks
the email was not addressed to you - this prevents messing up mailing
lists and the like.

you many need to add somethig like

-a mymailbox@example.com

to the vacation command-line in your .forward file


--
When I tried casting out nines I made a hash of it.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/