Submitted by jfquestiaux on Mon, 05/30/2011 - 03:24
Hi,
I have a virtual server installed with a Joomla! Website. I send email from this site using the PHPmail function. However, my client has another mail server. When I set up the server, I enabled the mail feature for this domain because I wanted to have a log of the mail sent from the site. But how to I have to configure the DNS then ? Also, the mail I receive from the site have a return path of "admin_username_of_the_domain@hostname", hostname being a valid domain name I own, but having nothing to do with the client. How can I have a return path of "info@domain_name_of_the_client" ?
Status:
Active
Comments
Submitted by jfquestiaux on Mon, 05/30/2011 - 05:42 Comment #1
To anticipate some questions you have, here are the current settings on both the domain managing console of the client (to which I don't have access) and the DNS settings on my server. For safety, I replaced the actual value by fake ones, but with the same matching :
On the domain console :
IP Address (A Records)
www 3600 155.155.155.155 @ (None) 3600 155.155.155.155 * (All Others) 3600 155.155.155.155
Mail Servers (MX Records)
inbound.domain_client.tld.registrar.tld.(10) 7200
Host Aliases (CNAME Records)
mail.domain_client.tld 7200 mail.domain_client.tld.registrar.tld. smtp.domain_client.tld 7200 smtp.domain_client.tld.registrar.tld.
On my server : @ IN SOA system_hostname. root.system_hostname. ( 1305883217 10800 3600 604800 38400 ) @ IN NS system_hostname. domain_client.tld. IN A 155.155.155.155 www.domain_client.tld. IN A 155.155.155.155 ftp.domain_client.tld. IN A 155.155.155.155 m.domain_client.tld. IN A 155.155.155.155 localhost.domain_client.tld. IN A 127.0.0.1 domain_client.tld. 120s IN MX 5 inbound.domain_client.tld.registrar.tld.
Submitted by andreychek on Mon, 05/30/2011 - 08:47 Comment #2
Howdy -- the "From" address is what will specify the individual domain names. The other headers are going to show details of the server it was sent from -- for example, the return path will show the system's hostname as well as it's reverse DNS, not the individual domain names.
As far as DNS settings go -- I'm not sure I understand what you're asking, or how the two servers relate.
However, I'll offer that any server that doesn't need to receive email wouldn't need the "Mail for Domain" feature enabled. And then, with that disabled, it will use MX records to determine where to deliver that email.
A system can still send email with "Mail for Domain" disabled (and that will all be logged), it's just not setup to receive email.
Submitted by jfquestiaux on Mon, 05/30/2011 - 09:29 Comment #3
Hello Andrey,
I think I undestand for the return path. However isn't it the adresse where the bouced mails are sent to ? if so, all the virtual server on this server will have the same return address ?
For the DNS part, the problem I have is that indeed I can send email from the server, but all the email sent to the addresses on the same domain just bounce and are not delivered. To be specific : this domain is mydomain.com - via a Joomla! application, I send email from info@mydomain.com to admin@mydomain.com, but the mail is not delivered because it bounces. The message is the log is : "Bounced for bounced (User unknown in virtual alias table)"
It must be some config issue because at the previous host, it used to work.
Submitted by jfquestiaux on Tue, 05/31/2011 - 09:57 Comment #4
In case someone encounters the same situation, I solve the problem by :
removing the email function for this domain - in another post, I found that there is still a mail log (in /var/log/)even though the mail function is disabled for a domain
removing the DNS function for that domain (since the DNS are managed on another server)
deleting any entry related to this domain in /etc/postfix/virtual
Now everything seems to work.