After add alias Sender address rejected


#21

So that there is no misunderstanding, here is the current status. From the forum go out the info@example.COM and that should be forwarded to webmaster@example.NET (these are 2 different domains). The webmaster@example.NET is the admin of MIAB.

I sent the emails by means of Putty from the forum, so with echo "relay test" | mail -s "relay test" test@hotmail.com The email always came in as root@example.com and then I created the sender_canonical_maps = hash:/etc/postfix/sender-canonical with the following content root@example.com info@example.com so the right sender will be displayed as soon as I send a testmail via Putty, but if I make a forwarding in MIAB do so info@example.com to webmaster@example.net, and get a testmail from the forum about Putty I as an error message (in the mail.log) info@example.com: Sender address rejected: not owned by user. Where is the mistake? Thank you for your efforts.


#22

I think your mistake is in the canonical_maps. Why are you rewriting the sender address?
I believe, but am not certain, that this changes the displayed address, but the sender is still root.

Are the logs on the MiaB server showing the connection and the error as well?

Rather than using the command line to test, why not force an email to be sent by your forum software to test? I will presume that you have configured your forum software correctly ---- and that even brings up another question — most modern forum software is set up to use SMTP sending in the first place, which means that the relay is not even needed. Which forum software are you using that is not having this functionality?


#23

Let’s test this theory … create a user on the forum server ‘info’. SSH into that user account using putty and try sending your test email.

IF that does not work, then create the alias on the MiaB server for root@example.com. Then test again using SSH from the same account that you were originally using (I am assuming the root account). Let me know the results of each test.

(These are both tests … we will not leave either modification permanently.)


#24

I can control the forum software also over smtp or alternatively over the Relay, that is not the problem. The problem is that I have on the forum server also Fail2ban am running and would like to be informed via email. Therefore, the relay.


#25

@sakis2018
Ok, so you have a secondary need in addition to the forum, that is fine. What are the results of the two tests I asked you to run in the previous message?