How to , and other stuff about linux, photo, php … Another blog just like others on internet

May 27, 2014

domain has no valid mail exchangers

Filed under: Linux — Tags: , , , , , — admin @ 8:33 pm

Today I face a strange problem with e-mail won’t be deliver, to a client . I have tested from yahoo, gmail and other service and everything was fine however one client from gmx was complain that he can’t send e-mail to that account

A message that you sent could not be delivered to one or more of
its recipients. This is a permanent error. The following address
failed:

“user@domain.com”:
domain has no valid mail exchangers

So, first impresion was to check if domain.com have a mx . So a short
dig mx domain.com output a

DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 mail.domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0 ;; QUESTION SECTION: ;domain.com. IN MX ;; ANSWER SECTION: domain.com. 2011 IN MX 10 mail.domain.com.

So it appear that is there.
But the problem was when I query to see who is the mail.domain.com

dig mail.domain.com

DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 mail.domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0 ;; QUESTION SECTION: ;mail.domain.com. IN A ;; ANSWER SECTION: mail.domain.com. 1937 IN CNAME domain.com. domain.com. 1937 IN A xxx.xxx.xxx.xx ;; AUTHORITY SECTION: domain.com. 1932 IN NS dns1.domain.com. domain.com. 1932 IN NS dns2.domain.com. ;; Query time: 3 msec

So we see that mail.domain.com is a CNAME, it appear that is against rfc , and need to be A zone and not alias/CNAME.
So the solution is to modify mail.domain.com to be A xxx.xxx.xxx.xxx

Regards

December 16, 2012

How to update DomainKeys on a cpanel server with existing accounts

Filed under: Linux — Tags: , , , — admin @ 2:30 pm

Hello ,
Well, I have a main server with cpanel , because is easy to make e-mail account’s there , and other server for other big sites. So basically I create account on cpanel server and after that I move ip to point to other server.
However if you server crash and you restore the cpanel account it appear that cpanel rebuild the dns zone, and you have to work twice, to redo the ip to old server .
If is one domain is easy but if you have a few , then a solution is to, restore /var/named files from backup that you made, and /etc/named.conf. After this what I do was to chattr +i /var/named/*.db . In this way cpanel will keep my old configuration. However your cpanel serve will create new dkim files for you, and you will have old values on your *.db files.
So, how we fix that ?
Firs of all when the restore is done make then movable again chattr -i /var/named/*.db
After this just run :
for user in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/dkim_keys_uninstall $user ; done
This will erase old dkim configuration for you, when is done run :
for user in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/dkim_keys_uninstall $user ; done

Now you have all information updated . Off course you should use those generated files from /var/cpanel/domain_keys on other server if you send mail from there also .

Best regards

July 27, 2012

how to view the body of a message that is in the queue

Filed under: Linux — Tags: , , — admin @ 11:14 am

Well first of all this is for postfix
First run
mailq
to see the queue for the server, after this you take the id and run
postcat -q ID
This will print full e-mail from queue

February 29, 2012

Standalone vs inetd

Filed under: Linux — Tags: , , , , , , — admin @ 11:34 am

What to use ?
Inetd or standlone server ?
Well I personally chose standalone, however if you have a server with low resources, and a service that you want to run from time to time, then you should go with inetd.

Inetd only spawns the process when it is needed, so the process does not consume resources when no one is using it. However, there is an overhead on each connection as inetd spawns a new process to handle it.

So if you have a heavy used service go with standalone.

Powered by WordPress