Sendmail: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
<source lang="properties">
<source lang="properties">
cat << EOF | sendmail -t  
cat << EOF | sendmail -t  
From: Sender <[email protected]>
From: Sender <[email protected].bd>
Reply-To: Sender <[email protected]>
Reply-To: Sender <[email protected].bd>
To: To <[email protected].bd>
CC: Cc <[email protected].bd>
Disposition-Notification-To: [email protected]
Disposition-Notification-To: [email protected].bd
Subject: Generic Subject
Subject: Generic Subject



Revision as of 08:10, 31 July 2021

cat << EOF | sendmail -t 
Sender: [email protected]
From: Sender <[email protected]>
Reply-To: Sender <[email protected]>
To: To <[email protected]>
CC: Cc <[email protected]>
Disposition-Notification-To: [email protected]
Subject: Generic Subject

Generic Body
EOF

Knowledge

/usr/sbin/sendmail -Am -v -t < filename.eml
/usr/sbin/sendmail -v -t < filename.eml
/usr/sbin/sendmail -t < filename.eml
launch interpreter by magic header or env
1. Python 3.9: #!/usr/bin/env python3.9
2. Python 2.6: #!/usr/bin/env python2.6
3. TS Node   : #!/usr/bin/env ts-node
4. Python    : #!/usr/bin/env python
5. NodeJS    : #!/usr/bin/env node
6. Ruby      : #!/usr/bin/env ruby
7. Perl      : #!/usr/bin/env perl
8. PHP       : #!/usr/bin/env php
9. GO        : #!/usr/bin/env go run
#resolve mail server
nslookup
: '
Default Server:  www0.dev.chorke.org
Address:  10.20.13.100

> set type=mx
> chorke.org
Server:  www0.dev.chorke.org
Address:  10.20.13.100

Non-authoritative answer:
chorke.org      MX preference = 0, mail exchanger = mail.chorke.org
> exit
'

References