Send mail to my own server

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Send mail to my own server

Post by goldfiles »

I have a very strange problem. I just moved my website to a VPS server, and had to relocate my SwiftMailer files, too. I can no longer send emails from @mydomain.com to @mydomain.com, but I can send to outside servers.

For example:

This works
$to_address = "webmaster@otherdomain.com";
$from_address = "support@mydomain.com";

This doesn't:
$to_address = "webmaster@mydomain.com";
$from_address = "support@mydomain.com";

I'm using SMTP with the Authenticator. Any thoughts on why this is happening? I assume it may have something to do with the new server mail settings, but I just don't know what.
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Re: Send mail to my own server

Post by goldfiles »

This issue isn't isolated to Swift Mailer. I just sent a couple emails out with php's mail() function with the same results. External emails will get the mail, but my internal accounts cannot receive mail from each other. I'm stumped.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Send mail to my own server

Post by Eran »

If you just moved servers and it working before, the problem is most likely in the mail server configuration.
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Re: Send mail to my own server

Post by goldfiles »

Ya, I don't know what settings I should be playing with to fix this.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Send mail to my own server

Post by Eran »

What OS are you running? and what mail server? Also, your server technical support might be the best option in this case.
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Re: Send mail to my own server

Post by goldfiles »

CentOS 5, not sure what mail server.

My host tech support is VERY slow. Takes at least 24 hours for them to respond to each ticket update.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Send mail to my own server

Post by Eran »

Try to find out the name of the mail server, it will also help you find relevant information on google.
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Re: Send mail to my own server

Post by goldfiles »

How would I find that out? What are some common mail server names, I might know it already but not realize it.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Send mail to my own server

Post by Eran »

http://gentoo-wiki.com/Comparison_of_Ma ... or_Players

We use exim over here (also on CentOS)
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Re: Send mail to my own server

Post by goldfiles »

Ah, yes Exim is what I have.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Send mail to my own server

Post by Eran »

I'll ask my linux guy if he has an idea what could cause this. I still recommend to open a support ticket with your NOC, they should be the most qualified to deal with it.
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Re: Send mail to my own server

Post by goldfiles »

Thanks, I appreciate it.

I've got a ticket open with my NOC. I don't expect them to reply until late tomorrow evening. They are beyond slow.
User avatar
goldfiles
Forum Commoner
Posts: 27
Joined: Sun Nov 12, 2006 5:50 pm

Re: Send mail to my own server

Post by goldfiles »

If it helps diagnose the problem any, I am using WHM on the server and my site is on cPanel. I don't currently have an SPF record setup for this server yet, either, but I doubt that would matter.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Send mail to my own server

Post by Eran »

Sorry it took so long (you probably worked it out by now), but my linux guy sent me this:
Probably problems with routers or transports.
But it could also be one something else, I’d need to have a look at the setup to know exactly what’s the problem

Tell him to to try running this command in the command line:

Exim –bt email@email.com

And then let you know what the error is.
Thanks
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Send mail to my own server

Post by Chris Corbyn »

Sounds like Exim is treating mydomain.com as a local_domain and therefore just writing the mail to disk wrongly. Exim thinks it's sent it, but it's actually delivered it to wrong server. You'll need to play around with your Routers configuration in Exim to by-pass that happening. As a hack you may have some joy changing the local_domains setting in the Main Exim configuration so that it no longers includes that domain name. Exim may try and be clever and resolve the domain though.

You want to force the domain to use the remote_smtp transport via routing rules. It's complex really so ask your host to help out if you're not comfortable doing it ;)
Post Reply