SMTP Relay for particular ip's
SMTP Relay for particular ip's
Hi. I'm trying to allow smtp relay for one ip address. I've edited the main.cf file in /opt/zimbra/postfix/conf. Once i add the ip to mynetworks = and restart postfix, the zimbra webmail stops functioning. if i remove the mynetworks line from main.cf, the webmail works again.
Reading the forums, i used the following post as examples.
http://www.zimbra.com/forums/showthread ... ight=relay
I">http://www.zimbra.com/forums/showthread ... mynetworks
I tried the zmprov mcf zimbraMtaMyNetworks command which also stopped the webmail from functioning. I see the edit it makes in main.cf but when i remove the edit and restart postfix, the mynetworks edit reappears in main.cf.
So my question is two fold, 1. How do i undo my zmprov mcf zimbraMtaMyNetworks command, and 2. how can i allow relay from one public ip while keeping webmail functionality? Also, is it necessary to include the netmask with the ip, or can i just specify a single ip address? Thank you for any assistance.
Reading the forums, i used the following post as examples.
http://www.zimbra.com/forums/showthread ... ight=relay
I">http://www.zimbra.com/forums/showthread ... mynetworks
I tried the zmprov mcf zimbraMtaMyNetworks command which also stopped the webmail from functioning. I see the edit it makes in main.cf but when i remove the edit and restart postfix, the mynetworks edit reappears in main.cf.
So my question is two fold, 1. How do i undo my zmprov mcf zimbraMtaMyNetworks command, and 2. how can i allow relay from one public ip while keeping webmail functionality? Also, is it necessary to include the netmask with the ip, or can i just specify a single ip address? Thank you for any assistance.
SMTP Relay for particular ip's
[quote user="DMRDave"]Hi. I'm trying to allow smtp relay for one ip address. I've edited the main.cf file in /opt/zimbra/postfix/conf. Once i add the ip to mynetworks = and restart postfix, the zimbra webmail stops functioning. if i remove the mynetworks line from main.cf, the webmail works again.
Reading the forums, i used the following post as examples.
http://www.zimbra.com/forums/showthread ... ight=relay
I">http://www.zimbra.com/forums/showthread ... mynetworks
I tried the zmprov mcf zimbraMtaMyNetworks command which also stopped the webmail from functioning. I see the edit it makes in main.cf but when i remove the edit and restart postfix, the mynetworks edit reappears in main.cf.
So my question is two fold, 1. How do i undo my zmprov mcf zimbraMtaMyNetworks command, and 2. how can i allow relay from one public ip while keeping webmail functionality? Also, is it necessary to include the netmask with the ip, or can i just specify a single ip address? Thank you for any assistance.[/QUOTE]
1 - zmprov mcf zimbraMtaMyNetworks ''
2 - postconf mynetworks
Add new.network.ip.range to the end of the return value from the postconf command, and set zimbraMtaMyNetworks to that value
Reading the forums, i used the following post as examples.
http://www.zimbra.com/forums/showthread ... ight=relay
I">http://www.zimbra.com/forums/showthread ... mynetworks
I tried the zmprov mcf zimbraMtaMyNetworks command which also stopped the webmail from functioning. I see the edit it makes in main.cf but when i remove the edit and restart postfix, the mynetworks edit reappears in main.cf.
So my question is two fold, 1. How do i undo my zmprov mcf zimbraMtaMyNetworks command, and 2. how can i allow relay from one public ip while keeping webmail functionality? Also, is it necessary to include the netmask with the ip, or can i just specify a single ip address? Thank you for any assistance.[/QUOTE]
1 - zmprov mcf zimbraMtaMyNetworks ''
2 - postconf mynetworks
Add new.network.ip.range to the end of the return value from the postconf command, and set zimbraMtaMyNetworks to that value
SMTP Relay for particular ip's
Is that one quote (") on the end of #1?
SMTP Relay for particular ip's
Doing #1 gives me this in my main.cf after a postfix reload.
mynetworks = ?
And the webmail doesn't work. I'm just trying to get back to where I started where my main.cf file had no mention of mynetworks. Thanks.
mynetworks = ?
And the webmail doesn't work. I'm just trying to get back to where I started where my main.cf file had no mention of mynetworks. Thanks.
SMTP Relay for particular ip's
Actually, it's two single quotes.
SMTP Relay for particular ip's
Instead of clearing it, and requerying, you can get the default this way:
postconf -d mynetworks
Then append your network to that, reset the zimbraMtaMyNetworks attribute, and restart postfix.
postconf -d mynetworks
Then append your network to that, reset the zimbraMtaMyNetworks attribute, and restart postfix.
SMTP Relay for particular ip's
[quote user="marcmac"]Then append your network to that, reset the zimbraMtaMyNetworks attribute, and restart postfix.[/QUOTE]
Sorry Marc, I'm new to postfix. What do you mean by append my network to the values given by postconf -d mynetworks and reset the zimbraMtaMyNetworks attribute?
zimbra@dmrmail01:~> postconf -d mynetworks
mynetworks = 127.0.0.0/8 69.28.108.0/27
Sorry Marc, I'm new to postfix. What do you mean by append my network to the values given by postconf -d mynetworks and reset the zimbraMtaMyNetworks attribute?
zimbra@dmrmail01:~> postconf -d mynetworks
mynetworks = 127.0.0.0/8 69.28.108.0/27
SMTP Relay for particular ip's
What IP do you want to relay mail for?
If it's 1.2.3.4, set zimbraMtaMyNetworks:
zmprov mcf zimbraMtaMyNetworks "127.0.0.0/8 69.28.108.0/27 1.2.3.4/32"
If it's 1.2.3.4, set zimbraMtaMyNetworks:
zmprov mcf zimbraMtaMyNetworks "127.0.0.0/8 69.28.108.0/27 1.2.3.4/32"
SMTP Relay for particular ip's
Thanks alot Marc. I got things working with your help. 'preciate it much.
Re: SMTP Relay for particular ip's
I am using zimbra 8.8.6 mail server. And I have set the relay IP on zimbra Relay Host, but I am not able to remove the configured relay IP from the zimbra server???
I have used the following commands :
zmprov ms <HOSTNAME> zimbraMtaRelayHost <IP>
echo <RELAYHOST> username:password > /opt/zimbra/conf/relay_password
postmap -q mail.mahagenrelay.com /opt/zimbra/conf/relay_password
zmprov ms <HOSTNAME> zimbraMtaMyNetworks <IP>
zmmtactl restart
I have used the following commands :
zmprov ms <HOSTNAME> zimbraMtaRelayHost <IP>
echo <RELAYHOST> username:password > /opt/zimbra/conf/relay_password
postmap -q mail.mahagenrelay.com /opt/zimbra/conf/relay_password
zmprov ms <HOSTNAME> zimbraMtaMyNetworks <IP>
zmmtactl restart