How to send test email specifying SMTP server
I'd like to test to see if I can send email unauthenticated from an smtp server from my red hat box.
If I want to send a test email from command-line, I would do something like this:
mail -s Test addr@domain.com < /dev/null
How do I specify an SMTP server to send the mail thr开发者_StackOverflow社区ough?
AFAIK you can't tell the built in 'mail' application which SMTP server to use - it simply uses sendmail on the local system.
You might want to grab the 'nail' rpm and use that instead, as then you can put 'set smtp=serveraddress' into /etc/mail.rc
You could try putting that in now, but it doesn't work on my CentOS 5.3 system.
精彩评论