-1

I have one VPS which forwards e-mails from one mailbox to another. Unfortunately ISP have blocked 25 port last week and since then I can't receive any e-mail from it. According to mailq there are 9000+ mails waiting. I need somehow to process the mail queue. VPS has CentOS installed and uses sendmail to deliver mails.

What could be your suggestions on solving the problem?

  • What's the path the mail was supposed to take? Where exactly in this path is SMTP blocked? – kasperd Jun 18 '15 at 15:06
  • Contact the ISP. If it wasn't blocked before typically SMTP gets blocked by your ISP after spam reports and you may be able to get it opened again. – HBruijn Jun 19 '15 at 07:54
  • You question is missing important information, I already sorry that I voted to migrate it to SU, the real solution should have been to close your question. – peterh Jun 19 '15 at 10:36

1 Answers1

3

If outgoing port 25 is blocked you cannot send email because you won't be able to connect to the remote MX. What I would do is setup in a different hosting provider a machine that is allowed to send email and set it up to relay from your VPS listening in a different port (e.g.: 1025), then you could configure your sendmail to forward all the emails to that machine. To do that you need to add

define(`SMART_HOST',`relay:your.new.machine.com')dnl
define(`RELAY_MAILER',`esmtp')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 1025')dnl

Apply that configuration and flush the queue with:

# ensure you have the package sendmail-cf installed 
/etc/mail/make
service sendmail restart
sendmail -q -v

Keep in mind that sending those 9,000 emails will be sent from the other machine, so they might be considered spam or dropped by the destinations, but that's a different question.

Pablo Martinez
  • 2,406
  • 17
  • 13