Hi I have Linux beginner questions, that I hope you can help me fix... First some info: I'm running a Ubuntu 20.04 server I have installed SSMTP that relays to my mail mailgun ACC. I have not installed Postfix - I only use SSMTP and mailgun The problem: When i got mails from ROOT, the sender mail is: "root@missing_domain" And because of the mail address, the mail goes to spam! So my question is. How can I change "missing_domain" to my domain??? All places where you see "mydomain.dk" it not my real domain name! I hope you understand me! My SSMTP config (ssmtp.conf) Code: # # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. [email protected] # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com mailhub=smtp.eu.mailgun.org:587 # Where will the mail seem to come from? #rewriteDomain= # The full hostname hostname=mydomain.dk [email protected] AuthPass=MYPASSWORD UseTLS=YES UseSTARTTLS=YES rewriteDomain=mydomain.dk # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address FromLineOverride=YES SSMTP revaliases Code: # sSMTP aliases # # Format: local_account:outgoing_address:mailhub # # Example: root:[email protected]:mailhub.your.domain[:port] # where [:port] is an optional port number that defaults to 25. root:[email protected]:smtp.eu.mailgun.org:587 ghost-mgr:[email protected]:smtp.eu.mailgun.org:587 Regards Thomas
My guess is Code: # Where will the mail seem to come from? #rewriteDomain= should be the senders domain. Read sSMTP docs to be sure what that setting means.
Hi @nhybgtvfr I can see when I use SSMTP it works fine If I run this command: Code: echo "Test Email message body" | mail -s "Email test subject" [email protected] I get the mail with the right receiver and from name/mail But when the cronjob sents mail like this Did it make sense Regards Thomas