Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postfix SMTP sender address #970

Closed
maxhq opened this issue Oct 19, 2015 · 3 comments
Closed

Postfix SMTP sender address #970

maxhq opened this issue Oct 19, 2015 · 3 comments

Comments

@maxhq
Copy link
Contributor

maxhq commented Oct 19, 2015

Problem
When mail is sent by Rockstor (or manually using echo "test" | mail root), my ISP complains:

invalid DNS MX or A/AAAA resource record (in reply to MAIL FROM command)

...because Rockstor's Postfix sends the following header with a local domain:

MAIL FROM:root@Rockstor.localdomain

Solution
This can be prevented by (see http://www.postfix.org/ADDRESS_REWRITING_README.html#generic):

  1. adding this to /etc/postfix/generic:

    root mysender@myisp.com

  2. running postmap generic

  3. adding this to /etc/postfix/main.cf:

    smtp_generic_maps = hash:/etc/postfix/generic

  4. running postfix reload

I guess it's not too hard to include these steps in the mail configuration script.

@phillxnet
Copy link
Member

@maxhq Thanks for this excellent advise. The email feature is a recent one and I also think it would definitely benefit from this.
In a configuration of my own https://github.com/phillxnet/ubuntu-home-server-postfix-installer-with-ssl-relayhost/blob/master/ubuntu-home-server-postfix-installer-with-ssl-relayhost I have the following in /etc/postfix/generic:-
where the rockstor system is named "rockstor.lan"
and the address of the dedicated sending account is rockstor@fastmail.co.uk
(as in the rockstor online docs)

@rockstor rockstor@fastmail.co.uk
@rockstor.lan rockstor@fastmail.co.uk

That way not only roots emails will be re mapped.

Does that look like a reasonable idea to you? In which case I'd be happy to have a crack at it as the email notification feature is quite important for notifications and failure alerts and the like so we don't want it rejected for having an invalid domain name.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 20, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 20, 2015
@maxhq
Copy link
Contributor Author

maxhq commented Oct 20, 2015

@phillxnet Your version is even better - thank you!

@phillxnet
Copy link
Member

@maxhq Thanks, hopefully I can make it work. I am currently working on a pull request for this issue.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 20, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 20, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 20, 2015
Since this is a slightly larger deal I have for the time being todo'ed
this aspect. This way we can at least get the majority of users sorted
re email from re-writes.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants