Postfix redirect

帅比萌擦擦* 提交于 2019-12-13 21:09:38

问题


I have tried so much and don't get things working.

I have a domain and no hosting/webmail so I wanted to redirect everything to my gmail account. As I have a linux (Lubuntu 13.06) machine running I thought I could configure a mail server. That seemed not to be so easy.

I have redirected my mail.domain.com to my ip and the port is open (I know this because while playing about, I once did receive an error message back by email from Postfix)

I am working with Postfix, however any other application is fine by me, if easier and just as safe.

I followed this instructions, however without success http://www.java-tutorial.ch/ubuntu/forward-all-incoming-email-to-single-address

All other instructions I read on the internet were alike.

When sending a test email (not from receiver address as this is a loopback issue with gmail) I do not receive a bounce and my log files are also empty so no clue what happens.


回答1:


I've got it working now. For everyone who also wants a mail server just for forwarding mail:


    nano /etc/postfix/main.cf
    inet_protocols = ipv4
    myhostname = mydomain.nl
    virtual_alias_domains = mydomain.nl
    virtual_alias_maps = hash:/etc/postfix/virtual
    transport_maps = hash:/etc/postfix/transport

    # catch all on your domain and send to gmail
    nano /etc/postfix/virtual
    @mydomain.nl mygmail@gmail.com

    # transport all traffic to gmail through your isp smtp server
    nano /etc/postfix/transport
    gmail.com smtp:smtp.myisp.nl:25

    postmap /etc/postfix/virtual
    postmap /etc/postfix/transport
    /etc/init.d/postfix restart



来源:https://stackoverflow.com/questions/23696631/postfix-redirect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!