Mass mail strategy? postfix / mailman

27 posts / 0 new
Last post
#1 Mon, 04/06/2009 - 08:41
max

Mass mail strategy? postfix / mailman

I have a client that wants to send an email blast from outlook contact list a couple of times a week. He has about 1000 recipients in his contact list.

1)how / where do I configure this in VM/postfix? I realize that if I up the limit it will be global for all domains, but that might be OK at this point.

2)what is mailman? can the user use his outlook list with out having to duplicate it in mailman? I cant seem to get the default "mailman" list to be made anyway...

Any advice/direction/strategies/policy appreciated... But would also like to know how to up the postfix limit too.

Thanks, Max

Mon, 04/06/2009 - 09:11
andreychek

Hi Max,

What limitation are you referring to? Are you seeing Postfix limit how many outbound messages can go out?

In theory, the only thing Postfix would limit by default would be the message size -- if you're seeing additional limitations, you might want to poke around in /etc/postfix/main.cf to see if some message quantity limits were later added in.

Mailman is mailing list manager -- your users could certainly use that for managing the list of people they're sending the email blast to. The advantage there is that it'll handle automatically unsubscribing people who no longer want to participate in the email blast.

Perhaps a better option is the phplist application, which is available in the Install Scripts.

In addition to being able to automatically unsubscribe people, it also has the ability to rate limit how many users it sends to at once, you don't have to handle setting that up in Postfix.

The thing to be careful with is that folks have to be careful how they go about sending out mass emails, or else they could get your entire IP address listed in one of several black hold lists. I ended up setting up a separate server purely for the folks who were sending out emails. I still get on their case about following all the anti-spam rules, but if they goof up, it doesn't affect all the hosting customers.
-Eric

Mon, 04/06/2009 - 09:36 (Reply to #2)
ronald
ronald's picture

in the postfix module there is a button called "delivery rates" which gives you some options. This is server wide.
I have "Max number of recipients per message delivery" set to 50 but I'd rather put a limit on hourly delivery for the server..

As for phplist (what I use) it is very good but a bit hard to configure properly.

Thu, 04/09/2009 - 05:47 (Reply to #3)
ronald
ronald's picture

<div class='quote'>1 Max number of parallel deliveries to the same destination: 20?
2 Max number of recipients per message delivery : 1000?
3 Initial concurrency level for delivery to the same destination: 5?</div>

what i have is
1 50
2 300
3 10

My first mailing I did was sending out 4500 emails in one batch (those got out in 25 minutes), I got more than one complaint back, so I got more careful since. Per batch I send 300 max, takes longer to send though.

As for DNS check, I use intodns.com for a quick check and http://www.squish.net/dnscheck/ for a thorough check.

<div class='quote'>Now should I use the command shell to download this </div>
wget is really handy for this. Log in and type: wget http://complete/url/ot/file.zip thus: [code:1]wget http://sourceforge.net/project/downloading.php?group_id=26031&amp;filena...

Thu, 04/09/2009 - 05:48 (Reply to #4)
ronald
ronald's picture
Fri, 04/10/2009 - 06:56 (Reply to #5)
ronald
ronald's picture

i agree it is very cryptic.
I get these values from phplist not postfix, although I do have delivery rates check to not send 50+ mails to same domains (like hotmail accounts)

to my best knowledge, please correct if Im wrong
1 you / your app can not send to 20+ addresses on 1 domain per batch/run (like hotmail, user1@hootmail, user2@hotmail etc)
2 it gets send 300, you'll then need to restart the cron (that's how phplist works anyway)
3 lets say more than one app (different customers) is/are doing a mailing which include same domains (like hotmail)

Sat, 04/11/2009 - 01:44 (Reply to #6)
ronald
ronald's picture

davvit
there must be a &quot;million&quot; ways to send out a mailing.
you might want to try phpledmailer, which is also available through the script installer right in Virtualmin Pro
http://www.ledscripts.com/free/php/phpledmailer

Usually you'll find exact instructions how to get and install a software package through the command line. I wouldn't unzip it on a pc and then upload it. Instead upload the zip and extracting it through virtualmin's filemanager would be another way of doing it, but at least the files won't get corrupted.

Mon, 04/06/2009 - 09:30
max

The feedback i got from the client when he tried his first email blast on my server was that only about 300 out of 900 email went through. I think the rest were returned to him.

Also he had an experience on the last server that they would take a long time to send, like they got released over time, and he didnt like that.

Mon, 04/06/2009 - 12:15
max

I have used phplist. I think there is a vulnerability advisory on it. Probably fixed by now, But I couldnt continue using it because of that at the time.

Mon, 04/06/2009 - 13:38
max

Anyone know of a good way to test mass mailing so that i dont need to actually send to my clients group?

Mon, 04/06/2009 - 16:26 (Reply to #10)
andreychek

Howdy,

I don't know of a way to test sending 1000 messages without actually sending them to someone :-)

Regarding your customer who had trouble sending messages -- I'd be curious what specific errors they were getting.
-Eric

Tue, 04/07/2009 - 14:10 (Reply to #11)
Joe
Joe's picture

I can think of a way to test, but it would be very complicated and time-consuming to setup. Basically, you'd setup a BIND server that authoritative for all of the domains in your list, and has phone MX records pointing to another mail server under your control that accepts all the mail for all of those domains. It'd be possible to script creation of the mail boxes and BIND zones, but the actual configuration process would still be very time-consuming. I'd estimate a full day or two, if you know what you're doing with BIND and Postfix, and dramatically more time if you don't.

You could try sending in small batches the first time, while watching the log for signs of trouble. That doesn't really prove that the big batch will work, but it does prove that sending to all of the recipients works without trouble.

Note also that there are a few gotchas to sending out to large batches of addresses:

1. Sending to many addresses in the same domain in a short period of time or in the same connection looks spammy. The latter is an efficiency feature of the SMTP protocol, but since it has been abused by spammers, it is often no longer useful to legitimate mailers. So, it may be necessary to send in smaller batches, anyway, in order to avoid triggering this problem.

2. Make sure your DNS is configured correctly for your mail server (meaning the name it uses resolves to the IP address it is connecting on), and that the DNS server that is authoritative for the From: address domain has an accurate SPF record.

3. Check to be sure your mail server is not already on any RBLs. If it is, fix the problem, and request de-listing.

I've solved the first problem in the past (when we migrated to a new CMS and needed to notify everyone of the username and password changes) by writing a simple Perl script that queried our user database for the addresses, and then sent one at a time every 2 seconds until they were all sent out. It also sorted on username rather than the domain name being sent to. This avoided any single mail server seeing messages from us in a big batch. It probably also helped that every message was customized to include the users name, their new password and other details about their specific account.

--

Check out the forum guidelines!

Wed, 04/08/2009 - 02:09
Davvit

Hi, This is something that I will need to be doing soon
as I will want to send my subscribers a newsletter.

I intend to have my php script simply work through the mysql client table and send each client the same email with a separate mail()
command in the while loop. I will NOT be using cc or bcc.

1) If I have 800 clients is this going to cause some kind of
server overload ?

2) Is this the best approach ?

3) Should I pause a second or two between a batch of
say ten, to avoid problems ?

4) You said:

<div class='quote'>2. Make sure your DNS is configured correctly for your mail server (meaning the name it uses resolves to the IP address it is connecting on), and that the DNS server that is authoritative for the From: address domain has an accurate SPF record.
</div>

Can I see ( and check ) that these are OK by looking in the log
after I have sent out a test to my own email account ?

What should I look for ?

Thanks

Wed, 04/08/2009 - 05:24 (Reply to #13)
andreychek

Howdy,

How much a load 800 emails will cause is going to depend on your hardware -- that's not too huge an amount. Some systems can do that without blinking, and for others, it's a bit tougher.

You could certainly build a few pauses into your script. You might also consider running it outside of business hours just in case.

And then, if you see too high a load, you could just increase the pause lengths for next time ;-)

Is it the best approach?

I mean, if it solves your problem in a way that works for you, than sure :-)

Personally, I might prefer a tool like PHPList since it already solves a lot of the rate limiting problems for you, and also makes it simple for users to opt-out if they no longer want to participate.

Regarding DNS -- the thing to do would be to use an external server to perform two DNS lookups -- one on the Internet facing IP address of your server to get the hostname... and then, another on that hostname to make sure it solves back to your IP address. Those two should match exactly.

You can do all that from the Linux command line (again, you'll want to do it from a server other than your own), or there's also various websites out there that can test it for you. Ronald has mentioned a few of them in the past, though at the moment I forget what they are :-)
-Eric

Wed, 04/08/2009 - 07:18
max

SETTINGS CHECK: Postfix Delivery rates

Max number of parallel deliveries to the same destination: 20?
Max number of recipients per message delivery : 1000?
Initial concurrency level for delivery to the same destination: 5?

Does any of that look good for enabling 1000 emails to quickly be emailed? Or is there more somewhere else?

Thanks,
max

Wed, 04/08/2009 - 07:19
Davvit

Hi,
You said the 800 may cause a problem depending on my
server.

I am using a dedicated server ( all mine)

Only a handful of websites on it for now.
(not very active)

spec:
Kernel and CPU Linux 2.6.18-53.1.14.el5 on i686
running:CentOS Linux 5
and :Virtualmin version 3.67 Pro

I guess means that it shouldn't be a problem
to run even several thousand emails ?

Wed, 04/08/2009 - 09:39 (Reply to #16)
andreychek

<div class='quote'>You said the 800 may cause a problem depending on my server]</div>

I try not to say much that's &quot;definitive&quot; -- usually :-)

800 messages really isn't all that much, in the grand scheme of things. I just like to error on the side of caution. If you're the one building the script that sends all that stuff out, I'd certainly add in a few pauses here and there since that'd be easy to do.

After you send it all out once or twice, and you find it's not a large load, it'd be trivial to reduce or remove the pauses.
-Eric

Thu, 04/09/2009 - 04:24
Davvit

I have asked about this subject on some other forums
and many have suggested using phpmailer.

Do you think that this would be a good
product to use and if so, how should I go about
getting it onto my server ?

( I notice that it is not on the Install scripts
page )

(BTW Max - I hope my questions and comments are
helpful to you - I am not trying to hijack your thread )

Thanks

Thu, 04/09/2009 - 04:27 (Reply to #18)
andreychek

Well, while I'm not familiar with phpmailer specifically, what I'd do is just go ahead and download it, copy it onto your server, then read the instructions for setting it up.

They'd probably have an INSTALL or README file that will help you get it going.

From there, you can test it out and see if it does the trick for you.
-Eric

Thu, 04/09/2009 - 09:10 (Reply to #19)
Joe
Joe's picture

<div class='quote'>I have asked about this subject on some other forums
and many have suggested using phpmailer.

( I notice that it is not on the Install scripts
page )</div>

PHPMailer is a library for sending mail with PHP scripts. It does not provide a user interface, as far as I know. Though it looks like the developers do provide some UI tools to make use of the PHPMailer library.

It pretty much doesn't make sense to provide an Install Script for this, as it usually needs to be placed in a specific location within your applications source directory. For example, our new Drupal website has it installed within the messaging module.

--

Check out the forum guidelines!

Thu, 04/09/2009 - 05:29
Davvit

Sorry for being a bit of a newbie but
I have never downloaded anything directly to
my server.

I don't have physical access to it
( mainly because it is on a different continent)

This is the website from which to download the
software:

http://sourceforge.net/project/showfiles.php?group_id=26031&amp;package_...

I think that I need phpMailer v5.0.0

Now should I use the command shell to download this
or is there a better section within WebMin
or VirtualMin to do this ?

Thu, 04/09/2009 - 09:16 (Reply to #21)
Joe
Joe's picture

<div class='quote'>Now should I use the command shell to download this
or is there a better section within WebMin
or VirtualMin to do this ?</div>

There is an Upload and Download module in Webmin for this purpose, which can download from a URL on the web. Keep in mind, however, that Sourceforge download URLs are tricky. You have to click, then cancel the download to your local machine, and look for the &quot;Direct Link&quot; or whatever on the page to get an actual download link that will work with wget or the file downloader in Webmin.

Once downloaded, though, you're still going to have to interact with it. Untar it, and such. For which a real shell is the way to go...PuTTY, as we discussed in another thread, will work fine.

--

Check out the forum guidelines!

Thu, 04/09/2009 - 16:05
max

Ronald,

thanks for keeping me on track.

1 Max number of parallel deliveries to the same destination: 20?
2 Max number of recipients per message delivery : 1000?
3 Initial concurrency level for delivery to the same destination: 5?

1 50 &lt;-so what is this doing exactly? to the same address?
2 300 &lt;-if the max is set to 300 and you try to send 1000 what happens?
3 10 &lt;-??

The way these descriptions are written seems kind of cryptic??

Fri, 04/10/2009 - 23:10
Davvit

Looks to me like it will be easier to download iphpMailer to my pc first, then unzip it, then upload the directory to my server on the virtual server that I want it to be on using smartftp ( thats what I usually use ).

It might take a bit longer but at least I will know what I am doing :)

Now,
I have to admit I am a bit confused though.

Having read a few tutorials about all this

There is this phpMailer
and there is SwiftMail
and there is PEAR:Mail

Are these three just similar methods of doing the same thing ?
i.e. they are all OOP classes that in the end use the
php mail() command ?

Then there is Sendmail.

I think sendmail is a server program like postfix - is that right ?

And does the mail() command send the email out using the server program ( sendmail or postfix ) ?

To be honest I am not sure is setting up phpMailer is the way to go
, would PEAR be better ? Cant use both I guess if they do the same thing !!

Sat, 04/11/2009 - 12:49 (Reply to #24)
Joe
Joe's picture

<div class='quote'>Looks to me like it will be easier to download iphpMailer to my pc first, then unzip it, then upload the directory to my server on the virtual server that I want it to be on using smartftp ( thats what I usually use ).</div>

&quot;easier&quot; is clearly in the eye of the beholder here. That sounds really complicated, to me. (Also error prone...If you do stuff on your Windows system, you're likely to end up with DOS line endings, which may or may not break things on Linux. So, to be safe, you'd want to also run dos2unix on all of the files after uploading them.)

Have you looked at the Webmin Upload and Download module?

wget is my favorite method of downloading this to remote systems (I also very frequently use is on my local machine when I already have a shell opened in the location I want the file), but it does require you to use the command line.

<div class='quote'>Are these three just similar methods of doing the same thing ?</div>

I dunno. They certainly could be. There are all sorts of ways to send mail, and I wouldn't be even a little surprised in the least if there are three similar libraries for PHP (there are certainly dozens for Perl and Python).

<div class='quote'>Then there is Sendmail.

I think sendmail is a server program like postfix - is that right ?</div>

sendmail means two different things. There is &quot;Sendmail&quot; the MTA, which is like Postfix. There is also the &quot;sendmail&quot; command, which comes in either the Sendmail package or the Postfix package. The sendmail command is simply a mail injector that knows how to inject mail into the queue of the MTA in question. They are pretty much identical from a user perspective; if you run the &quot;sendmail&quot; command on a Postfix system it will behave exactly the same as if you run the &quot;sendmail&quot; command on a Sendmail system. What happens behind the scenes is different, but you don't need to care about that, at all.

<div class='quote'>And does the mail() command send the email out using the server program ( sendmail or postfix ) ?</div>

&quot;mail()&quot; would be a function, not a command. (Though there is a &quot;mail&quot; command on most UNIX and Linux systems that is also capable of sending mail.)

I would imagine that the method the mail() function uses to send is configurable.

I think you're fretting way too much about the minutiae of the underlying mail server here. Don't think about the mail server. Just use whatever library you're comfortable with, configure it to send using the SMTP server on localhost (no authentication required for a local sender), and forget about everything else. The underlying stuff (like whether it's Postfix or Sendmail) doesn't matter; they all speak the same protocol.

--

Check out the forum guidelines!

Mon, 11/06/2017 - 01:10
Mohit Sharma

We are Warm-up Email service provider, we are provide complete platform and server solution for emailing if you need please let us know.

  1. Targeted email list to send email If you don’t have email list
  2. Newsletter list with unsubscribe function (Custom PHP unsubscribe)
  3. smtp service with SPF / DKIM DMark maybe dedicated ip
  4. A/B testing
  5. Customisable html templates
  6. Scheduled sending maybe with calendar or date function
  7. Tracking function
  8. Skype support

We also provide PMTA installation with IEM (Interspire Email Marketing service) Postfix with multiple IP’s rotation Any kind of SMTP service we can make for you, You can also contact us for VPS/dedicated server for mailing

Skype me: mohit.sharma6611 email: sharmamadhavsolutions@gmail.com

myb

Tue, 03/13/2018 - 01:34
Peter Simon

Thank you guys for all your help.

arcade game