This is a discussion on how to send Internet e-mail from script? within the Linux Administration forums, part of the Linux Forums category; All the how-tos I've read on the subject assume that you've got a nice MTA working to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
All the how-tos I've read on the subject assume that you've got a nice
MTA working to handle all your e-mail both locally and through the Internet. Then it's just a matter of giving it the recipient's address and off it goes. Unfortunately, I don't have an MTA. I need to send an e-mail to a remote address through an SMTP server that requires authentication (i.e. your typical SOHO or home setup). From a GUI I can configure Thunderbird or whatever without any problems and it works. However, I have some scripts that need to send out Internet e-mail notices from a server without a GUI and without user intervention. Is there a good howto on the subject anywhere? |
|
|||
|
Hi.
This doesn't answer your original question, but it will allow you to send mail. Hopefully, that's good enough. Since you're using Linux, you should have sendmail on your computer (or you can install it from an RPM). Should you find it necessary to reconfigure sendmail a bit, you'll also need to install the sendmail-cf RPM. Having done so, all you need to do is pipe your mail msg into /usr/sbin/sendmail. In bash, something like the following will do the job: $ /usr/sbin/sendmail -t <<EOF To: vader@empire.org From: luke@jedi.org Dear Dad: Send money. EOF There are also some Perl modules (Mail::whatever) that deal with email; maybe one of them will solve the original problem. -- Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker GCS/M (GAT): d? -p+ c++ l u+(-) e--- m* s n+ h f g+ w+ t++ r- y? Internet: agw STRUDEL cs.columbia.edu ATTnet: Columbia U. (212) 939-7060, Fordham U. (212) 636-6325 |
|
|||
|
Gary Dale <garydale@rogers.com> wrote:
> Unfortunately, I don't have an MTA. I need to send an e-mail to a remote > address through an SMTP server that requires authentication (i.e. your > typical SOHO or home setup). From a GUI I can configure Thunderbird or > whatever without any problems and it works. However, I have some scripts > that need to send out Internet e-mail notices from a server without a > GUI and without user intervention. > > Is there a good howto on the subject anywhere? Why don't you make it easy on yourself and pick/install a nullmailer. See: "Nullmailers" on http://linuxmafia.com/kb/Mail/ |
|
|||
|
Art Werschulz wrote:
> Hi. > > This doesn't answer your original question, but it will allow you to send > mail. Hopefully, that's good enough. > > Since you're using Linux, you should have sendmail on your computer (or you > can install it from an RPM). Should you find it necessary to reconfigure > sendmail a bit, you'll also need to install the sendmail-cf RPM. > > Having done so, all you need to do is pipe your mail msg into > /usr/sbin/sendmail. In bash, something like the following will do the job: > > $ /usr/sbin/sendmail -t <<EOF > To: vader@empire.org > From: luke@jedi.org > > Dear Dad: > > Send money. > EOF > > There are also some Perl modules (Mail::whatever) that deal with email; > maybe one of them will solve the original problem. > Actually, I work with Debian Sarge, which is normally configured to use Exim4 instead of SendMail. However, I have no (other) use for it in most SOHO situations. The problem with both packages is that the configuration is close to rocket science, even in Debian, and both are vast overkill when all you want to do is route your outgoing e-mail to your ISP's smtp server. |
|
|||
|
Rick Moen wrote:
> Gary Dale <garydale@rogers.com> wrote: > > >>Unfortunately, I don't have an MTA. I need to send an e-mail to a remote >>address through an SMTP server that requires authentication (i.e. your >>typical SOHO or home setup). From a GUI I can configure Thunderbird or >>whatever without any problems and it works. However, I have some scripts >>that need to send out Internet e-mail notices from a server without a >>GUI and without user intervention. >> >>Is there a good howto on the subject anywhere? > > > Why don't you make it easy on yourself and pick/install a nullmailer. > See: "Nullmailers" on http://linuxmafia.com/kb/Mail/ > Thanks Rick. There are three there that I can investigate. Hopefully I can get one to work. :) |
|
|||
|
Rick Moen wrote:
> Gary Dale <garydale@rogers.com> wrote: > > >>Unfortunately, I don't have an MTA. I need to send an e-mail to a remote >>address through an SMTP server that requires authentication (i.e. your >>typical SOHO or home setup). From a GUI I can configure Thunderbird or >>whatever without any problems and it works. However, I have some scripts >>that need to send out Internet e-mail notices from a server without a >>GUI and without user intervention. >> >>Is there a good howto on the subject anywhere? > > > Why don't you make it easy on yourself and pick/install a nullmailer. > See: "Nullmailers" on http://linuxmafia.com/kb/Mail/ > The nullmailers all seem to lack one essential feature. They don't seem to have a method of authenticating to the smtp server. From the limited documentation and from playing around with two of them, they seem to assume that your smtp server is either open or gets its authentication information locally. Unfortunately, I don't know anyone who doesn't authenticate outside of the "departmental mailhub" that sSMTP talks about. This puts me back at trying to configure Exim4 to handle the hand-off. :( |
|
|||
|
Gary Dale <garydale@rogers.com> wrote:
> This puts me back at trying to configure Exim4 to handle the hand-off. :( Well, Exim's the easiest to configure of the major MTAs (sendmail, Exim, Postfix, Courier-MTA, and the proprietary qmail program), so you're probably on a least-pain trajectory. |
|
|||
|
Rick Moen wrote:
> Gary Dale <garydale@rogers.com> wrote: > > >>This puts me back at trying to configure Exim4 to handle the hand-off. :( > > > Well, Exim's the easiest to configure of the major MTAs (sendmail, Exim, > Postfix, Courier-MTA, and the proprietary qmail program), so you're > probably on a least-pain trajectory. > Maybe, but after setting up passwd.client and modifying the config file to send username & password, I'm still not getting anywhere. The exim log shows a 530 error connecting to the smtp server. I'm trying to connect to a rogers server, so my passwd.client line is: smtp.broadband.rogers.com:garydale@rogers.com:mypa ssword THis is the same authentication information I had to provide to Thunderbird. I also modified conf.d/auth/30_exim4-config_examples by uncommenting the scripts that allow smtp authentication. Still no luck. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|