Re: Horde webmail plesk 10.2
Posted: Mon Jul 25, 2011 2:03 pm
Thanks for this example 

I'm not sure I understand your question, could you clarify?I am slowly understanding this but which but relates to unblocking imap through a new firewall rule.
mikeshinn wrote:I'm not sure I understand your question, could you clarify?I am slowly understanding this but which but relates to unblocking imap through a new firewall rule.
Hi Mike,mikeshinn wrote:I cant speak for APF, and not sure if it could do, but you would want to create iptables rules that limit the output to just those userids that would normally do this. For example, to limit outbound SMTP to just qmail and postfix, you would add rules like there:
iptables -I OUTPUT -p tcp --dport 25 -m owner --uid-owner qmail -j ACCEPT
iptables -I OUTPUT -p tcp --dport 25 -m owner --uid-owner postfix -j ACCEPT
iptables -I OUTPUT -p tcp --dport 25 -m owner --uid-owner root -j ACCEPT
iptables -I OUTPUT -p tcp --dport 25 -d 127.0.0.1 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 25 -j LOG_SMTP_OUT
iptables -A LOG_SMTP_OUT -m limit --limit 1/second -j LOG --log-level info --log-prefix "Unauth-SMTP " --log-tcp-sequence --log-tcp-options --log-ip-options
iptables -A LOG_SMTP_OUT -j REJECT
The format of a rule that is limited to a user is:
iptables -I OUTPUT -p PROTOCOL --dport PORT -m owner --uid-owner USERNAME -j ACCEPT
Where PROTOCOL would probably almost always be "tcp", except maybe in the case of DNS when it would be "udp".
PORT is the outbound port, 25 for SMTP, 80 for HTTP, etc.
and USERNAME is the trusted non-malicious username, such as "qmail".
For other services, you would need to identify the user that would normally, and non-maliciously connect outbound and limit that port to that user.
Do you mean they cant connect to your IMAP service? If thats the issue, they you just need to open tcp ports 993 and 143 on your system to allow connections to your IMAP services. Although theres nothing in ASL that would change this, so I suspect you are not referring to your firewall rules.sorry to be a pain, basically what I mean is my imap worked before and as per the thread after upgrading I cannot connect to IMAP.
Check your apache logs too, if apache is configured to not do something (such as PHP being configured to not allow certain functions), it will log that error.i tried opening these two php functions and I still couldn't get in.