Forwarded mail Postfix

My scenario :
I have NS installed on a local machine, and a qualified domain name for internal use only, in the guise of mailer.internal.intra
I have 10 users setup , and their primary email address setup as an alias against each user.
I am using the POP3 connector, with Multidrop enabled.
I am using the SMARTHOST

With the setup above, all is working. Internal network clients can send mail via Outlook to NS , which in turn either delivers it locally if sent to a internal client , or it connects to the SMARTHOST and sends via my hosted domain’s connection.
All looks good, mail is received by the recipient and the headers all look ok.

Pretty much the same ( in reverse ) occurs when internet mail is received at my webhost’s. Mail is collected using the POP3 connector and downloaded to NS.
NS resolves the enevelope and deliver’s it locally as you expect.

All good up to now …

Now one user, works remotely and receives email when out and about, so I have configured NS to just forward the email to another email address which they have with their ISP. But it looks like Postfix connects to the Smarthost but sends the email from vmail@mailer.internal.intra
I have tried 2 ISP’s , 2 different email accounts.
1 account fails with 550 sender verify failed for vmail@mailer.internal.intra
1 account fails with no MX or A record for vmail@mailer.internal.intra

How can I get forwarded mail to come from a FQDN so that it passes the above?
Or is there another way ?

The same occurs if I login to NS shell and use sendmail form the command line , it fails with root@mailer.internal.intra with the 2 above messages.

Any help would be great


You may setup custom helo:

Hi Markus
I set the helo as pointed out, but it didnt work for me. I get the same errors as previously posted.

Any other pointers would be much appreciated. Below is the maillog error on NS

status=bounced (host[] said: 550 vmail@mailer.internal.intra sender rejected - invalid domain (no MX or A record) (in reply to MAIL FROM command))

Here’s another howto addressing your issue:

Hi Markus
I’ve applied the fix, but I still get the same errors unfortunately


Its specifically mail coming direct from the server I think. Anything sent to the NS via outlook goes OK.

The message below is the failed forwarded message that I have setup in the NS email accounts.

550-Verification failed for vmail@mailer.internal.intra 550-The mail server could not deliver mail to vmail@mailer.internal.intra. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))

Is there anyway to change the vmail@$hostname , so that I can provide a valid email address and then this should verify.


First I have to say that a smarthost is not recommended:

To set another hostname in postfix:

mkdir -p /etc/e-smith/templates-custom/etc/postfix/

Create /etc/e-smith/templates-custom/etc/postfix/ with following content:

myhostname = real.domain.tld

Apply the config:

signal-event nethserver-mail-common-save

I don’t know, if there’s some other impact when changing the postfix hostname, so please try it in a test environment first.

Changing the hostname in postfix has done the trick. Emails now forwarded by the NS are sent via vmail@MYFQDN

All seems OK, I have tried several scenarios. Will stress test next few hours.
Just looking into it further, whilst this fix works, what would have been a better way to setup the server with the configuration i have as listed in the first post ?
I didnt want to go messing with the FQDN DNS records, as the mail MX records go off to a third party for on-the-fly scanning of spam / virus’s. Then they are delivered locally back to the webhosts server.

I can think of various ways if starting from scratch , but I needed to have minimal impact on the process.

Many thanks for your help. Its much appreciated.


You may use a real domain instead of an internal one for the server name. Postfix uses that server name and there should be no problems with forwarding to other mailservers and no need for the custom template.