Emails misfiring, need a cure :(

Started by stylusss, November 01, 2012, 04:14:50 PM

Previous topic - Next topic

stylusss

My forum sends out countless emails in a day due to the number of individuals registering and personal messaging. The fail-rate of emails being sent is 25% - I never had this problem prior to switching to a dedicated VPS (I'm the only user on the VPS).

I need a permanent solution to prevent these emails from not being sent. I am losing far too many registrations as a direct consequence of this. I tried using Google mail (SMTP) to send out emails, and while the fail-rate is very low, I think they have a restriction on the number emails that can be sent in a day.

How can I configure my VPS so that this doesn't occur anymore :'(
For top-notch server quality and expertise, visit CoreISP.net

青山 素子

What is the reason for the failure? There is usually some error message provided when the mail fails to be delivered.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


stylusss

Quote from: 青山 素子 on November 01, 2012, 07:15:51 PM
What is the reason for the failure? There is usually some error message provided when the mail fails to be delivered.

None in the forum error log. The host administrator said that it's due to high volume, but I don't buy that at all ??? I just think he doesn't know how to configure it.
For top-notch server quality and expertise, visit CoreISP.net

青山 素子

Ask them for the actual error messages. It would show in the mail log at the very least.

Also, what is your domain? I can do some basic checks for common issues (bad DNS configuration, IP on blacklists, etc) if I know that.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


mrintech

Have you configured the Mail Queue: http://wiki.simplemachines.org/smf/Mail ?

There must be a hourly/daily limit on the number of emails that can be sent

stylusss

Hi folks, my forum uses sendmail to send emails, although this is causing a lot of messages not getting sent (25%). I want to configure sendmail so that it sends messages more efficiently, but I have NO idea how to configure the amount that gets sent per hour.

The send mail file is found in /usr/sbin/sendmail and in /usr/lib/sendmail

What do I type in to pUTTY to get this to work more efficiently?

Willing to pay for a response, that's how desperate I am.
For top-notch server quality and expertise, visit CoreISP.net

青山 素子

It's not as simple as typing something. If you're using Sendmail itself, you'll need to find and install a milter that will handle outbound connection rate limiting. If you're using Postfix, there are a few configuration settings, but you might also have to find an external solution that will connect in.

How did you arrive at the conclusion that you need to rate-limit outbound messages?
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


青山 素子

Still waiting on more information as requested. Why did you open a new topic on the exact same issue, stylusss?
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


stylusss

Quote from: 青山 素子 on November 03, 2012, 02:56:13 PM
Still waiting on more information as requested. Why did you open a new topic on the exact same issue, stylusss?

That thread is based on sendmail. Anyway, the host couldn't help me with it, he said I should use another server, like critsend.com - this is very expensive.

He then recommended gmail as my SMPT. I did that once, however, but due to the number of individuals with fake emails or cancelled email addresses from the past, when the forum sends periodic emails, they bounce back via Mailer-Daemon, and GMAIL assumes I'm sending spam, so they stop sending emails. That's why I can't use that anymore.

I'm just fed up that this is happening. Why doesn't this happen to this website (http://www.simplemachines.org) or any other, why mine?

I'm shooting blanks here, that's why I'm guessing it's sendmail as the problem. I'm really close to quitting this forum thing as a result. Why can't I configure this properly?

I will even pay for a proper solution.
For top-notch server quality and expertise, visit CoreISP.net

Storman™

Appreciate this is frustrating for you but responders have asked lots of questions but no replies have been forthcoming. For us to help you we need answers to those questions.

For example:

1. How many emails are being sent per day ? 100 or a 10,000 ?  (countless emails per day is a bit vague...)

2. Why are you convinced they are not being sent ? Just because they are not being delivered does not necessarily mean they don't leave your VPS.

I know of one instance where Hotmail had blacklisted a domain, consequently it appeared that a certain number of emails were not being sent when in fact they simply did not get through to the members who had Hotmail accounts.

3. Have you checked to see if emails from your domain are blacklisted ? Go HERE and check your IP address

4. Does your VPS have a control panel ? If your knowledge is limited then one might help you to configure your email and check logs.

Please, please, check your mail log for clues

It'll probably be in   /var/log/maillog   but that depends on your distro, otherwise it'll be one of these:


    /var/log/maillog
    /var/log/mail.log
    /var/adm/maillog
    /var/adm/syslog/mail.log


stylusss

Hi there, thanks for the reply:

1. How many emails are being sent per day ? 100 or a 10,000 ?  (countless emails per day is a bit vague...)

1000 to 2000.

2. Why are you convinced they are not being sent ? Just because they are not being delivered does not necessarily mean they don't leave your VPS.

Not sure.

3. Have you checked to see if emails from your domain are blacklisted ? Go HERE and check your IP address

Not at all. I checked.

4. Does your VPS have a control panel ? If your knowledge is limited then one might help you to configure your email and check logs.

I have attached it for you to see.

Thank you, hope you have a solution for me!
For top-notch server quality and expertise, visit CoreISP.net

青山 素子

Thanks for posting some information. I already see some of the issues. By the way, you're using Postfix instead of Sendmail. (Yes, there's a sendmail command, but that doesn't actually mean it's Sendmail itself...). Also, it looks like you're seeing a lot of deferrals, not rejects.

It looks like you at least have one DNS issue. Make sure the IP from your server resolves to a DNS name that resolves to that IP. Many mail servers will not accept mail if this isn't set up correctly.

Example:
I'm sending mail from 10.11.11.1
The PTR for that IP is "myserver.example.com".
The name "myserver.example.com" resolves to 10.11.11.1.

If you do not have any DNS PTR record for your IP, or it resolves to a name that doesn't resolve back, you'll have mail rejected.

Second, you don't have a proper hostname set up for the server. It's set to "bh_deb_tweak". Edit /etc/postfix/main.cf and set "myhostname" to the DNS name of your server.



Making those two fixes should solve 80-90% of your mail issues. Once you have that straightened out, the remainder can be looked at.




Quote from: stylusss on November 03, 2012, 03:30:33 PM
I'm just fed up that this is happening. Why doesn't this happen to this website (http://www.simplemachines.org) or any other, why mine?

Because, at least for this site, the servers are managed by professionals with experience in setting things up. Even then, there are still issues. For the longest time, Comcast was blocking mail because they could. I think it took three or four months before they fixed their problem.

For shared hosting, most of the time the provider at least has some experience in setting up things properly. When you go VPS or dedicated, you're often on your own to figure out how to run a server.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


stylusss

Hey, I'm excited to make these changes, however, what is the of my DNS server or how do I find out what it is?

Thanks for the reply.
For top-notch server quality and expertise, visit CoreISP.net

青山 素子

Usually you can't change the PTR record (unless you have 256 IPs assigned to you). Check how it's set up and if you need and adjustment, contact your hosting provider.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


stylusss

#14
QuoteMake sure the IP from your server resolves to a DNS name that resolves to that IP. Many mail servers will not accept mail if this isn't set up correctly.

Hi there, thanks for your reply. How do I make sure of this? How do I know the IP of my server? I found out that my DNS of my server is 5918500438. I found this by looking at /etc/hostname. How do I set this up? By the way, i switched the myhostname "bh_deb_tweak" to 5918500438, like you suggested,  and no emails were being sent - I ever restarted the server each time.

See the attachment.
For top-notch server quality and expertise, visit CoreISP.net

青山 素子

/etc/hostname is the name of the server internally. It is NOT the IP. What is your forum domain? I'll find the IP from that for you.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


stylusss

Quote from: 青山 素子 on November 04, 2012, 03:12:51 PM
/etc/hostname is the name of the server internally. It is NOT the IP. What is your forum domain? I'll find the IP from that for you.

I just want to say thank you so much for your help. I wish I could donate for the time you're investing.

Check out the attachments I added, I believe in the file host, it shows the IP.

My forum is http://biology-forums.com

Let me know anything else. By the way, since yesterday, more than 150 people didn't get an email activation :( Just activated them manually.

By the way, here's what is stated in hosts:

::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
207.182.137.253 5918500438 testimage test12 3934973173

For top-notch server quality and expertise, visit CoreISP.net

青山 素子

Ah, your IP is right there (and I just did some checks to confirm): 207.182.137.253

Right not, it does have a proper ptr, but the name is "dynamic looking", so you'll probably want to contact your hosting provider (xlhost?) to get that changed. Have them set the PTR to "biology-forums.com". Then, in main.cf, set myhostname to "biology-forums.com". Make sure to restart postfix. Usually, that's "service postfix restart" as root.

You can do the Postfix config part while you wait on the DNS stuff. That half alone should help considerably.


Quote from: stylusss on November 04, 2012, 03:17:42 PM
I just want to say thank you so much for your help. I wish I could donate for the time you're investing.

No problem. If you do feel like donating, you are free to do so to this project of any amount you feel it worthwhile. You're also welcome to donate directly to me personally, but it's really up to you.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


stylusss

Notice that in main.cf, bh_deb_tweak occurs twice:

myhostname = bh_deb_tweak
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = mail, bh_deb_tweak, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all


Do I change both h_deb_tweak to biology-forums.com?
For top-notch server quality and expertise, visit CoreISP.net

青山 素子

Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: