Help with outgoing emails

Hello !! Looks like I’m one of the firsts here ! :smile:

First, thanks for this great script, configuring a server for email is a real hard task …

I’ve managed to install succesfully the script here but I’m not reciving any of the mails sent from there. I have no problem to receive any kind of email, but sending doesn’t work at all.

The installation is done at a digitalocean’s droplet.

Any suggestions on what could went wrong ?

Thanks a lot !!! :smiley:

So you are attempting to send mail from Roundcube, and it’s telling you

Message sent successfully.

But the email never makes it to the destination?

It might be stuck in the mail queue on the server. SSH into the server and run:

postqueue -p

If the output is Mail queue is empty, then the problem is elsewhere. But if the output looks like:

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
3347720828      673 Sat Jul 12 09:17:26  someone@example.com
(Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)

You might get some clues as to why sending isn’t working.

You are right !
The mail is stuck in the mail in the queue ! What should i do ¿?

thanks !

Can you paste the output of postqueue -p here?

    -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
0F773121233     1441 Fri Jul 11 11:39:49  gabi@planne.rs
(connect to alt2.gmail-smtp-in.l.google.com[173.194.64.27]:25: Connection timed out)
                                         gabriel.maeztu@gmail.com

12F4012123D      691 Fri Jul 11 16:27:54  gabi@planne.rs
(connect to alt2.gmail-smtp-in.l.google.com[173.194.64.27]:25: Connection timed out)
                                         gabriel.maeztu@gmail.com

5B21512128D      654 Sun Jul 13 16:38:13  gabi@planne.rs
            (connect to smtp2.lg.ehu.es[158.227.2.7]:25: Connection timed out)
                                         alasa019@ehu.es

58F2D121237      621 Fri Jul 11 14:07:06  gabi@planne.rs
(connect to ALT2.ASPMX.L.GOOGLE.COM[2607:f8b0:4003:c02::1b]:25: Network is unreachable)
                                         gabriel.mp@uic.es

BD86A12123C      664 Fri Jul 11 14:18:33  gabi@planne.rs
(connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4003:c02::1b]:25: Network is unreachable)
                                         gabriel.maeztu@gmail.com

95A7A12122E      536 Fri Jul 11 11:34:07  gabi@planne.rs
(connect to alt2.gmail-smtp-in.l.google.com[173.194.64.27]:25: Connection timed out)
                                         Gabriel.maeztu@gmail.com

Thanks for being so fast answering !!

Your box is not able to connect out to the internet on TCP port 25. It could be a routing issue or a firewall issue. Can you post the output of both these commands?

  • sudo ip route
  • sudo iptables-save

I end up with google apps. I was in a hurry and we are a big team. But thanks anyway ! I’ll keep an eye in the project for next time!

Thanks again !!