Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


sSMTP + Mandrill relay alternative when SMTP ports blocked?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

sSMTP + Mandrill relay alternative when SMTP ports blocked?

ChronicChronic Member
edited February 2015 in Help

Hey,

I have picked up the VPSDime birthday special a while ago and the mail ports are blocked on it. Usually I set up sSMTP with Mandrill's SMTP relay to forward certain emails to my private address if necessary. Nothing fancy, mind you - mostly just cron-apt output and whatever other mail the root user might get.

I am not particularly skilled in these matters and sSMTP was easy enough for me to setup and works the way I need it to. With the mail ports blocked on the new VPS though, I am clueless about how to reproduce the above setup by using Mandrill's API instead of the SMTP relay. Is such a thing even possible? Is there any better alternative?

Any help would be much appreciated.

Comments

  • All of the ports blocked? 25, 485, 587?

  • Many mail servers also operate on 26

  • pbalazs123 said: All of the ports blocked? 25, 485, 587?

    Yes. And 2525, which is another alternative Mandrill offers.

    >

    Google

    I don't understand how that applies to me. I have nothing to do with PHP here. I would like to forward the local system mail to my private address via Mandrill.

  • netomxnetomx Moderator, Veteran

    Chronic said: I don't understand how that applies to me. I have nothing to do with PHP here. I would like to forward the local system mail to my private address via Mandrill.

    I didn't understand that part on your post... can you cat the mail?

  • ChronicChronic Member
    edited February 2015

    netomx said: I didn't understand that part on your post... can you cat the mail?

    I apologise if I failed to explain my situation properly. That is largely due to my own poor understanding of the underlying workings of the Linux system.

    Here is what is happening on my existing VPS, where SMTP ports are not blocked:

    1. cron-apt runs and generates it's report.
    2. The report is mailed to the root user.
    3. sSMTP rewrites the To: for the mail sent to the root user to what I configured it as: [email protected].
    4. sSMTP connects to smtp.mandrillapp.com:587 and uses Mandrill's SMTP relay to deliver the mail containing the cron-apt report to [email protected]
    5. I log into my [email protected] account (which is hosted on Google Apps) and check the cron-apt report to make sure everything is fine.

    The issue with my VPSDime VPS is that SMTP ports are blocked. As such, sSMTP has no way of connecting to Mandrill's SMTP relay to deliver the email to [email protected]. If I want to send the cron-apt reports to my email from the VPS, I have to use Mandrill's API. I am not aware of any way to do the same I described above using the API. In essence, I'm looking for something that will act as an MTA on the system, but instead of the SMTP protocol use the Mandrill API to send emails.

    Does anything like that exist? Am I approaching this situation poorly? Maybe there's another solution to my problem that I haven't considered.

    Edit: On my existing configuration, I have no way to cat the email - I don't think it's saved anywhere in a file. sSMTP just picks it up and sends it away as appropriate. If I used Exim4 as my MTA, I believe the email would be saved under /var/spool/mail, at which point I could cat it, yes.

  • netomxnetomx Moderator, Veteran

    Do you have another VPS? You may try to open a port in your other VPS and redirect it to MAndrill's SMTP

    Thanked by 1Chronic
  • ChronicChronic Member
    edited February 2015

    @netomx said:
    Do you have another VPS? You may try to open a port in your other VPS and redirect it to MAndrill's SMTP

    I do! Could you please point me in the right direction for doing this? I assume I'd have to open a SSH tunnel between the two VPS and configure iptables?

    Something like this perhaps? http://askubuntu.com/questions/28516/redirect-requests-to-my-external-ip-port-to-a-different-external-ip-port

  • deadbeefdeadbeef Member
    edited February 2015

    Edit: nope, I was wrong

  • Here's my (updated) idea:

    a) On your unlocked VPS, set this up http://emailrelay.sourceforge.net in proxy mode on port 10025 to forward everything to smtp.mandrillapp.com

    b) On your locked VPS, set sSSMTP to send mail to the relay you set up above.

    c) Make sure to read the emailrelay 's documentation for enabling the remote client connections and the security configurations so that you don't end up with an open relay.

    Thanked by 1Chronic
Sign In or Register to comment.