[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How does Cron send email?



Grok Mogger wrote:
Joshua J. Kugler wrote:
On Wednesday 21 February 2007 15:53, Grok Mogger wrote:
I have read the cron manpage.  I understand what cron mails and
under what conditions it mails it, what I don't understand is
HOW it mails it.  I know that cron just sends the output of
whatever script it runs.  I don't understand how it mails that
output.  I'd like to understand how it does that so that I can
make it send email to a gmail account or a similar "real"
Internet account.

Are you telling me that if I set my MAILTO entry to something
like 'Joe.Person@gmail.com', that's actually going to send
legitimate Internet mail to Joe at his gmail account?  I find
that hard to believe.

Believe it. Cron will send it whereever you want it to. setting the MAILTO to randomuser@gmail.com is not different than forwarding a local user's account to that same gmail account. Linux is very amiable to you wishes. :)

What do you mean "legitimate internet mail?" What would illegitimate internet mail be?

As far as *how* it does it, I believe it just pipes the output of the commands run to either the mail command or the sendmail command, but I could be wrong.

Instead of asking us if MAILTO a gmail account will work, and waiting for a reply, you could just try it, you know. :)

j



I never dreamed that would actually work. Setting MAILTO to a valid gmail account felt like typing "OH PLEASE MAIL ME NOW AT MY REAL EMAIL ACCOUNT!!! THX LINUX BYE! OMG I R0XORZ!!1!" at the command prompt and having it actually work. Hence, the not actually trying it and instead sending mail to the list asking for help. Sorry for wasting everyone's time. Thanks to everyone for helping me out anyway. =)

I (clearly) have a very limited understanding of how email works. Anyone have any suggestions for good reading?

And secondly, with this little epiphany comes a realization of just how easy it is to spam and where it all comes from... I could easily bombard whomever I wanted with email from my Linux box sitting right here without the need for a valid "mail account" on a "mail" server or anything of the like. That's right, isn't it?

It will be traceable to your IP address, and after a while you will
be blacklisted. Spam is invariably sent from somebody else's computer
after hijacking it, or through a mail server configured as an open
relay (yes, they still exist).

But be even more amazed. Here is email at its simplest and most basic:

http://support.microsoft.com/kb/153119

Yes, this even works from Windows. No MTA, nothing beyond a telnet
client needed. Ignore the Windows-specific stuff, and the warnings.
This will work with any mail server that's willing to accept a
connection from you (see the dynamic IP address stuff in another
reply). It must of course be the mail server which handles mail for
that particular person.

There's a more complicated set of commands to send email to someone
through another mail server, if they won't accept email direct. It
involves having an account on the intermediate server and supplying
your user name and password. MTAs exist to deal with all the messy
details, particularly the bit about finding which mail server should
handle the mail for the recipient.



Reply to: