outgoing email via smtp, php... where are they?

11 posts / 0 new
Last post
#1 Thu, 05/29/2014 - 05:56
aras.t

outgoing email via smtp, php... where are they?

im been running virtualmin for a long time now, not working so much with it when it works perfecty.. however email..

using wordpress in a subserverdomain, trying to send php forms to gmail and it does not work. its telling me its been send but can find it in gmail and cant find where the logs are. nothing in apache logs :(

i tried using smtp plugin but its the same... so im thinking.. where should i begin to search? do i need to open specific ports for outgoing trafic like 495 for ssl to gmail?

thanks for advice.

Thu, 05/29/2014 - 08:28
andreychek

Howdy,

You may be able to find out additional information by reviewing your email logs, and looking for where those emails are going.

You can find those email logs in either /var/log/maillog, or /var/log/mail.log.

-Eric

Thu, 05/29/2014 - 12:34 (Reply to #2)
jimdunn

Is there a way to log the "outgoing emails"?

I have added logging to the php.ini files, allowing me to "spy on spam"...

But I need to see some of these outgoing emails sent by worms on users home machines that connect and toss spam using my server...

Thu, 05/29/2014 - 14:28 (Reply to #3)
aras.t

May 29 20:53:19 webservern postfix/smtp[5003]: 330E3123EFB: to=sendtouser@gmail.com, relay=none, delay=84411, delays=84391/0.06/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)

seems that i got issues with nameserver, can i fix this in virtualbox or do i need to ssh into terminal?

suggestions?

thanks for reply

Thu, 05/29/2014 - 15:26 (Reply to #4)
andreychek

Hi aras.t -- you appear to be seeing a DNS related issue.

Could you start a new Forum thread? That would make it easier to discuss your issue. Thanks!

-Eric

Thu, 05/29/2014 - 12:40
andreychek

Howdy,

Any email sent by Postfix, or received by Postfix, would show up in the email logs.

-Eric

Fri, 05/30/2014 - 10:11 (Reply to #6)
jimdunn

Hey Eric,

Yes, there's an "entry" in the email logs... but I want to turn on "full email body/headers logging" so I can see the entire email.

Fri, 05/30/2014 - 14:58
andreychek

Howdy,

Well, there isn't a simple "switch" to enable subject logging, and I'm not sure if it's possible at all to log the body itself.

However, this blog post here describes how to setup logging of the email subject:

http://davidsj.co.uk/log-subject-lines-in-postfix/

Tue, 06/03/2014 - 12:12
aras.t

i think i solved the dns issue, now i got another error.... suggestions?

thanks for reply!

Jun  3 17:39:45 webservern postfix/smtp[24382]: connect to alt1.gmail-smtp-in.l.google.com[173.194.64.26]:25: Connection timed out
Jun  3 17:39:45 webservern postfix/smtp[24382]: connect to alt1.gmail-smtp-in.l.google.com[2607:f8b0:4003:c02::1a]:25: Network is unreachable
Jun  3 17:39:45 webservern postfix/smtp[24382]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4001:c03::1a]:25: Network is unreachable
Jun  3 17:39:45 webservern postfix/smtp[24382]: 1F0EB123F1A: to=<sendtothisadress@gmail.com>, relay=none, delay=238780, delays=238720/0.12/60/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4001:c03::1a]:25: Network is unreachable)
Jun  3 17:39:48 webservern postfix/smtp[24381]: connect to alt2.gmail-smtp-in.l.google.com[74.125.142.26]:25: No route to host
Jun  3 17:39:48 webservern postfix/smtp[24381]: 89EB4123ED8: to=<sendtothisadress@gmail.com>, relay=none, delay=69562, delays=69499/0.1/63/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.142.26]:25: No route to host)
Jun  3 17:40:15 webservern postfix/smtp[24380]: connect to alt2.gmail-smtp-in.l.google.com[74.125.142.26]:25: Connection timed out
Jun  3 17:40:15 webservern postfix/smtp[24380]: BD7E4123FC6: to=<sendtothisadress@gmail.com>, relay=none, delay=85910, delays=85819/0.1/90/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.142.26]:25: Connection timed out)
Tue, 06/03/2014 - 13:23
andreychek

Howdy,

Do you see that problem just with emails to Gmail? Or do you have problems sending mail to any external server?

If it's email to all servers, does your ISP block port 25?

Some do indeed block that, which can cause the problem you're seeing.

-Eric

Wed, 06/04/2014 - 15:11 (Reply to #10)
aras.t

well, this was pretty strange, the ISP allowing sending, but not to @gmail.com

changed it to @live.com smtp settings and it works like a charm :)

thanks :)

Topic locked