1

I am using Ruby on Rails 4, I own my own webserver with domainname, but use a local maschine to send mails.

I send mails via SMTP (ActionMailer::Base.smtp_settings = {..settings..})

To my question: Is it possible to send mails with the message-id that is like ...@example.com (my domainname) and not like ...@localhostname.mail?

And if I cannot get it from SMTP (or how ever those message-ids are generated) could I just override the message-id-header so that abcd@localhostname.mail becomes abcd@example.com? Or does that mess something up? For example when I send a mail from my system and another from my normal mail program.

Thanks in advance

Fallenhero
  • 1,563
  • 1
  • 8
  • 17

1 Answers1

0

There are settings for your SMTP server software (postfix?) to set a domain name so it doesn't use your local hostname. You should go through the documentation of your SMTP software to find out which setting this is (sorry, I'm not a real email expert).

zwippie
  • 15,050
  • 3
  • 39
  • 54
  • thanks for your answer. I am using Ruby on Rails, which includes the smtp server. I check there. (ofc i will award you, if this will solve it) – Fallenhero Nov 29 '16 at 14:54
  • I was just too retarded to search. This solves my problem: http://stackoverflow.com/questions/6598343/set-the-message-id-mail-header-in-rails3-actionmailer – Fallenhero Nov 29 '16 at 15:28
  • I can award bounty only in 21 hrs – Fallenhero Nov 29 '16 at 15:28