Can you send mail out, like
Code:
$ ls -l | mail -s 'The files in my home dir' jxxxxxxx@gmail.com
?
In case of success your
/var/log/maillog should have entries like:
Code:
Nov 16 19:59:24 hercules sendmail[12489]: pAGIxO2E012489: from=j65nko,
size=10287, class=0, nrcpts=1, msgid=<201111161859.pAGIxO2E012489@hercules.utp.xnet>,
relay=j65nko@localhost
Nov 16 19:59:24 hercules sm-mta[25711]: pAGIxO2b025711:
from=<j65nko@hercules.utp.xnet>, size=10580, class=0, nrcpts=1,
msgid=<201111161859.pAGIxO2E012489@hercules.utp.xnet>, proto=ESMTP,
daemon=MTA, relay=localhost [127.0.0.1]
Nov 16 19:59:24 hercules sendmail[12489]: pAGIxO2E012489:
to=jxxxxxx@gmail.com, ctladdr=j65nko (1001/1001), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=40287, relay=[127.0.0.1]
[127.0.0.1], dsn=2.0.0, stat=Sent (pAGIxO2b025711 Message accepted
for delivery)
Nov 16 19:59:25 hercules sm-mta[28910]: STARTTLS=client,
relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL,
cipher=RC4-SHA, bits=128/128
Nov 16 19:59:26 hercules sm-mta[28910]: pAGIxO2b025711:
to=<jxxxxxx@gmail.com>, ctladdr=<j65nko@hercules.utp.xnet> (1001/1001),
delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=40580,
relay=gmail-smtp-in.l.google.com. [209.85.143.26], dsn=2.0.0,
stat=Sent (OK 1321469966 p66si14961380weq.141)
When my box sends out the mail it will do a DNS lookup for the MX (Mail eXchange) record of gmail.com, i.e. :
Code:
dig -t mx gmail.com
; <<>> DiG 9.4.2-P2 <<>> -t mx gmail.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30079
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;gmail.com. IN MX
;; ANSWER SECTION:
gmail.com. 2613 IN MX 30 alt3.gmail-smtp-in.l.google.com.
gmail.com. 2613 IN MX 40 alt4.gmail-smtp-in.l.google.com.
gmail.com. 2613 IN MX 20 alt2.gmail-smtp-in.l.google.com.
gmail.com. 2613 IN MX 5 gmail-smtp-in.l.google.com.
gmail.com. 2613 IN MX 10 alt1.gmail-smtp-in.l.google.com.
;; Query time: 1 msec
;; SERVER: 192.168.222.10#53(192.168.222.10)
;; WHEN: Wed Nov 16 20:15:57 2011
;; MSG SIZE rcvd: 150
It will then try to send the mail off to
gmail-smtp-in.l.google.com. because, with a priority of 5, it is the first choice for the gmail.com domain.
If you have neither, a domain name nor MX record for that domain, you still should be able to ask a friend to send mail to you with something like:
Code:
$ mail -s 'test' zyos@[84.83.82.81] <testmessage.txt