forwarding doesn't work

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
whodg073
New user
New user
Posts: 6
Joined: 2021-05-06 15:36

forwarding doesn't work

Post by whodg073 » 2021-05-06 17:56

hMailServer 5.6.8-B2538 I have tried the forward tab in accounts as well as creating a rule. Neither seem to work. From the log file, the delivery thread to an account with forwarding enabled delivers to the account correctly but then creates a .eml file in the root of the data directory. The log never shows any attempt to contact the mail server of the intended forward email address set in the account.

Here is a section from the log file for an email sent from my gmail account to my local domain account

"TCPIP" 10756 "2021-05-06 08:40:57.329" "TCP - 209.85.218.53 connected to 192.168.10.3:25."
"SMTPD" 10756 432 "2021-05-06 08:40:57.344" "209.85.218.53" "SENT: 220 HeyThereHiThereHoThere"
"SMTPD" 11692 432 "2021-05-06 08:40:57.438" "209.85.218.53" "RECEIVED: EHLO mail-ej1-f53.google.com"
"SMTPD" 11692 432 "2021-05-06 08:40:57.454" "209.85.218.53" "SENT: 250-smtp.mydomain.com[nl]250-SIZE 20480000[nl]250-AUTH LOGIN PLAIN[nl]250 HELP"
"SMTPD" 7808 432 "2021-05-06 08:40:57.563" "209.85.218.53" "RECEIVED: MAIL FROM:<xxxxxx@gmail.com> SIZE=2298"
"TCPIP" 7808 "2021-05-06 08:40:57.735" "DNS lookup: 53.218.85.209.zen.spamhaus.org, 0 addresses found: (none), Match: False"
"TCPIP" 7808 "2021-05-06 08:40:57.798" "DNS lookup: 53.218.85.209.bl.spamcop.net, 0 addresses found: (none), Match: False"
"SMTPD" 7808 432 "2021-05-06 08:40:58.063" "209.85.218.53" "SENT: 250 OK"
"SMTPD" 10756 432 "2021-05-06 08:40:58.157" "209.85.218.53" "RECEIVED: RCPT TO:<yyy@mydomain.com>"
"SMTPD" 10756 432 "2021-05-06 08:40:58.188" "209.85.218.53" "SENT: 250 OK"
"SMTPD" 11692 432 "2021-05-06 08:40:58.282" "209.85.218.53" "RECEIVED: DATA"
"SMTPD" 11692 432 "2021-05-06 08:40:58.298" "209.85.218.53" "SENT: 354 OK, send."
"SMTPD" 2424 432 "2021-05-06 08:40:58.766" "209.85.218.53" "SENT: 250 Queued (0.384 seconds)"
"APPLICATION" 4044 "2021-05-06 08:40:58.782" "SMTPDeliverer - Message 27239: Delivering message from xxxxxx@gmail.com to yyy@mydomain.com. File: D:\hMailServer\Data\{B4841D72-FEA2-4317-BB53-434D88C9A5AA}.eml"
"SMTPD" 11692 432 "2021-05-06 08:40:58.876" "209.85.218.53" "RECEIVED: QUIT"
"SMTPD" 11692 432 "2021-05-06 08:40:58.876" "209.85.218.53" "SENT: 221 goodbye"
"APPLICATION" 4044 "2021-05-06 08:40:58.891" "SMTPDeliverer - Message 27239: Message delivery thread completed."

The account yyy@mydomain.com keeps a copy of the email and is supposed to forward to zzz@someotherdomain.com

If I set up a rule to handle forwarding the log file looks just the same as this.
Any help is appreciated.

mikedibella
Senior user
Senior user
Posts: 517
Joined: 2016-12-08 02:21

Re: forwarding doesn't work

Post by mikedibella » 2021-05-06 18:29

There is a one minute delay, by design, when forwarding using the method you describe. Check the queue (Status > Delivery queue) and you should see an item with a future Next try time. Wait a minute and the server will deliver that message.

whodg073
New user
New user
Posts: 6
Joined: 2021-05-06 15:36

Re: forwarding doesn't work

Post by whodg073 » 2021-05-06 21:30

Thanks for the response. I have waited days. the mail still does not send.

User avatar
johang
Senior user
Senior user
Posts: 560
Joined: 2008-09-01 09:20

Re: forwarding doesn't work

Post by johang » 2021-05-06 21:46

whodg073 wrote:
2021-05-06 21:30
Thanks for the response. I have waited days. the mail still does not send.

i have to ask.. can you send email to zzz@someotherdomain.com from yyy@mydomain.com ?

since you are trying to relay mail from gmail ( forward ) to another server, do you know if they ( admin of mailserver at someotherdomain.com ) will accept you sending mail to them and you pretending to be gmail ? ( the anti spam efforts gmail does with SPF and dkim would kick my ass there trying to impersonate that domain )
___________________________________________________________end of the line

whodg073
New user
New user
Posts: 6
Joined: 2021-05-06 15:36

Re: forwarding doesn't work

Post by whodg073 » 2021-05-06 22:25

yes from my email tool, Thunderbird, I can send from yyy@mydomain.com to zzz@someotherdomain.com

A forward would come from the yyy@mydomain.com account as the sender not from the xxx@gmail.com account I was trying to forward. I originally had some of the emails I am now trying to forward as distribution lists. The output of the distribution list makes it appear as if the mail from xxx@gmail.com was coming from my server as xxx@gmail.com.

That stopped working about 3 weeks ago.
There were log entries for that showing why the delivery was denied.

With the forward, I never even see an attempt at delivery in the log file.

mikedibella
Senior user
Senior user
Posts: 517
Joined: 2016-12-08 02:21

Re: forwarding doesn't work

Post by mikedibella » 2021-05-06 23:34

Try adding

Code: Select all

RewriteEnvelopeFromWhenForwarding=1
to hMailServer.ini. Restart the service. Retry the operation.

whodg073
New user
New user
Posts: 6
Joined: 2021-05-06 15:36

Re: forwarding doesn't work

Post by whodg073 » 2021-05-07 17:31

That did not seem to help and still showing no signs of trying in the log file

User avatar
johang
Senior user
Senior user
Posts: 560
Joined: 2008-09-01 09:20

Re: forwarding doesn't work

Post by johang » 2021-05-07 18:16

whodg073 wrote:
2021-05-07 17:31
That did not seem to help and still showing no signs of trying in the log file
do you log SMTP APPLICATION TCP/IP and DEBUG ?

if you set up test account and then forwarding locally within your email server does that work ?
and test forwarding outside to other domain/mailserver ( why not trying to forward to outlook or gmail just for test )
___________________________________________________________end of the line

whodg073
New user
New user
Posts: 6
Joined: 2021-05-06 15:36

Re: forwarding doesn't work

Post by whodg073 » 2021-05-07 19:28

I have all logging enabled except debug. I will try a forward to an internal account and turn on debug

whodg073
New user
New user
Posts: 6
Joined: 2021-05-06 15:36

Re: forwarding doesn't work

Post by whodg073 » 2021-05-07 19:55

xxx@gmail.com sent to yyy@mydomain.com then forwarded to ttt@mydomain.com worked
Entries in the log file

Will try to a different external domain

Post Reply