0

I have an amazon linux 2 server running in the aws cloud and I have yum-cron running on it. I have an email domain mydomain.com which is running on a separate server in a completely different cloud environment (bluehost). I have the following settings in /etc/yum/yum-cron.conf:

email_from=myuser@mydomain.com
email_to=security@mydomain.com
email_host=localhost

The above configuration works beautifully and I am asking how exactly does it work? As far as I know sending an email is a somewhat complicated process. You must connect to an SMTP server, provide a hostname, port and login credentials, and when the email is sent its given to that SMTP server which handles the actual sending of the email. Localhost is (as far as I know) NOT an smtp server, so how is yum-cron managing to send emails? I was expecting this configuration to fail.

1

I would speculate that your amazon linux 2 server running in the aws cloud is running a mail server (probably sendmail or postfix) listening on port 25 probably only on the loopback address (127.0.0.1). Yum-cron "sends" the mail to the mail server running on localhost and then it relays it out to the internet.

  • Makes sense. It's running postfix. – Ring Nov 29 '18 at 17:37
1

It is a fairly common pratice to have a mailserver running localy, accepting mails beeing sent from localhost. Often these mails are forwarded to a central server which accepts mails originating from the local subnets.

The mails you mention, are actually what users nowadays know, but by far not the only way how to handle mails.

As you mention yum-cron it is likely that postfix is on your system. For details check /etc/postfix/main.cf and master.cf.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.