I have a Digital Ocean VPS, at which I installed postfix. I want to do mail forwarding.
When I installed postfix I picked No configuration option. Later I set up the following:
I created main.cf
at /etc/postfix
virtual_alias_domains = gintegraconstruccion.com
virtual_alias_maps = hash:/etc/postfix/virtual
Created virtual
contacto@gintegraconstruccion.com mypersonalmail@gmail.com
I restarted postfix then.
At my DNS configuration (I got godaddy) I did:
Created an A record:
Host Points to
contacto 107.XX.XX.XX
Created a MX record:
Host Points to
@ contacto.gintegraconstruccion.com
However I tried it and got any mail at my gmail inbox.
The output of dig gintegraconstruccion.com
is:
; <<>> DiG 9.8.1-P1 <<>> gintegraconstruccion.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34297
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;gintegraconstruccion.com. IN MX
;; ANSWER SECTION:
gintegraconstruccion.com. 599 IN MX 0 contacto.gintegraconstruccion.com.
;; Query time: 93 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Wed May 14 13:01:53 2014
;; MSG SIZE rcvd: 67
Just for the record, I'm currently hosting site with Openshift as I've not migrated it.
Cheking at /etc/log/mail.log
I found:
May 14 11:52:51 localhost postfix/postfix-script[24478]: fatal: the Postfix mail system is not running
May 14 12:02:05 localhost postfix/postfix-script[24600]: fatal: the Postfix mail system is not running
May 14 12:02:27 localhost postfix/master[24724]: daemon started -- version 2.9.6, configuration /etc/postfix
May 14 12:02:31 localhost postfix/master[24724]: reload -- version 2.9.6, configuration /etc/postfix
May 14 13:06:07 localhost postfix/smtpd[24865]: error: open database /etc/aliases.db: No such file or directory
May 14 13:06:07 localhost postfix/smtpd[24865]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
May 14 13:06:07 localhost postfix/smtpd[24865]: connect from f.qw.se[109.74.194.71]
May 14 13:06:13 localhost postfix/smtpd[24865]: disconnect from f.qw.se[109.74.194.71]
May 14 13:06:44 localhost postfix/smtpd[24865]: connect from f.qw.se[109.74.194.71]
May 14 13:07:07 localhost postfix/smtpd[24865]: 5F052432EF: client=f.qw.se[109.74.194.71]
May 14 13:07:15 localhost postfix/smtpd[24865]: disconnect from f.qw.se[109.74.194.71]
May 14 13:10:36 localhost postfix/anvil[24867]: statistics: max connection rate 2/60s for (smtp:109.74.194.71) at May 14 13:06:44
May 14 13:10:36 localhost postfix/anvil[24867]: statistics: max connection count 1 for (smtp:109.74.194.71) at May 14 13:06:07
May 14 13:10:36 localhost postfix/anvil[24867]: statistics: max cache size 1 at May 14 13:06:07
May 14 13:14:20 localhost postfix/master[24724]: reload -- version 2.9.6, configuration /etc/postfix
May 14 13:18:29 localhost postfix/master[24724]: reload -- version 2.9.6, configuration /etc/postfix
May 14 13:21:04 localhost postfix/smtpd[24982]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
May 14 13:21:04 localhost postfix/smtpd[24982]: connect from mail-wi0-f175.google.com[209.85.212.175]
May 14 13:21:05 localhost postfix/smtpd[24982]: 1BC40432EF: client=mail-wi0-f175.google.com[209.85.212.175]
May 14 13:21:05 localhost postfix/cleanup[24987]: 1BC40432EF: message-id=<CA+z_Byat_HTi2WxSuvtis5OOk-pbYcqehT-Ntj6Xvra=kxD_6g@mail.gmai$
May 14 13:21:05 localhost postfix/qmgr[24976]: 1BC40432EF: from=<diegoaguilaraguilar@gmail.com>, size=2670, nrcpt=1 (queue active)
May 14 13:21:05 localhost postfix/smtpd[24982]: disconnect from mail-wi0-f175.google.com[209.85.212.175]
May 14 13:21:05 localhost postfix/smtp[24988]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c01::1a]:25: Network is unreachable
May 14 13:21:06 localhost postfix/smtp[24988]: 1BC40432EF: to=<diegoaguilaraguilar@gmail.com>, orig_to=<contacto@gintegraconstruccion.c$
May 14 13:21:06 localhost postfix/qmgr[24976]: 1BC40432EF: removed
Last lines of log (after mail sent from a hotmail worked):
May 14 13:52:19 localhost postfix/smtpd[25133]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
May 14 13:52:19 localhost postfix/smtpd[25133]: connect from col0-omc1-s18.col0.hotmail.com[65.55.34.28]
May 14 13:52:20 localhost postfix/smtpd[25133]: 22ED0432EF: client=col0-omc1-s18.col0.hotmail.com[65.55.34.28]
May 14 13:52:20 localhost postfix/cleanup[25137]: 22ED0432EF: message-id=<COL129-W83EFDE2F958513C56F1FEC8F370@phx.gbl>
May 14 13:52:20 localhost postfix/qmgr[25091]: 22ED0432EF: from=<piah.garci@hotmail.com>, size=1528, nrcpt=1 (queue active)
May 14 13:52:20 localhost postfix/smtpd[25133]: disconnect from col0-omc1-s18.col0.hotmail.com[65.55.34.28]
May 14 13:52:22 localhost postfix/smtp[25138]: 22ED0432EF: to=<cesarleonardoor@icloud.com>, orig_to=<contacto@gintegraconstruccion.com>$
May 14 13:52:22 localhost postfix/qmgr[25091]: 22ED0432EF: removed