sendmail tings

Send mail via sendmail

vi /tmp/email.txt

Insert

Subject: Terminal Email Send
Email Content line 1
Email Content line 2

(ESC)wq(ENTER)

sendmail user@example.com < /tmp/email.txt

Quick and dirty, with subject only:

mail -s "Test Subject" user@example.com < /dev/null

Faking Mails with cutomized sender:

mail -s "Everything possible" -aFrom:bill.gargantur@iliketobeanemailfaker.com recipient@maildomain.com < /dev/null

*Will be delivered into spamfolder or not delivered cause SPF checks that mailsender is not authorized sender of the maildomain –> only if accurate spamsolution/SPF is implemented on recipient side

Install/Config sendmail
for just relay edit /etc/mail/sendmail.cf and add:

"Smart" relay host (may be null)

DSrelay.example.com

or if ip based:

"Smart" relay host (may be null)
DS[10.10.10.10]

of course relay host must permit this.

2+
Advertisements

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.