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

Re: [msmtp-users] Using msmtp with Sendmail



On 2007.05.08 05:09 Teresa Havel wrote:
I have perl scripts that are integrated with
Sendmail to automatically send email to an
address list.  I would like to use the perl
scripts as they are written, but direct the
resulting emails to go through msmtp so
they can be sent to another server for final delivery. Is it possible to use msmtp in
this way?

Msmtp has no ability to flush a mail queue so if your scripts are set up to dump an email into a queue for each addressee and then send all mail in one connection it won't work. However, if your scripts create one email then send it then drop the upstream connection, create the next email then send it then drop the upstream connection, create the next email ..., you can do this with msmtp.

Alternatively, if your scripts create one email with multiple recipients on the To, Cc and/or Bcc lines, then msmtp will handle that.

The short answer is: msmtp will work (and work very well) with scripts but it will not do bulk mailings. For bulk email you will have to install an email forwarder that (a) can put mail into a queue, and (b) can then send all mail previously deposited in that queue. Linux help lines simply will NOT assist you in this regard because of the possibility(probability) that any such application will be used for spamming.

If your need is genuine (not spamming) then you will have to install a mailing list manager, such as mailman, or an MTA with "queue and flush" capabilities. For "queue and flush" both nullmailer (which is what I use) and email-relay (which I haven't tried) have the added advantage that the queue that they create is unique to them -- this means that you can use nullmailer or email-relay for bulk mailing exclusively and still use sendmail (or msmtp or whatever) for "ordinary" mail.

HTH,
Robert Thorsby