Hi, I'm using SSMTP to send some mails.
ssmtp.conf
And my ipfw rule to allow smtp gmail's server:
So far so good. At this point(considering I just rebooted my server) I'm perfectly able to send all emails that I want.
The problem is, after some days the IP of that address(smtp.gmail.com) changes(In fact everytime time you ping it will show up with a different IP than the previous).
I could simply reload ipfw.rules and it will update the IP but because of this line in my sysctl.conf
I'm getting this errors in my messages log file:
Is there anything I can do to solve this instead of rebooting my system every time emails stops working? I believe what I have to do is allowing the kernel to accept the new IP. Just a theory as I am a newbie.
When I do
[CMD=""]sockstat -4[/CMD]
Should it show a entry like *.*.*.*:587 ? Could be this what is causing my problem?
ssmtp.conf
Code:
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=*@gmail.com
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so named.
mailhub=smtp.gmail.com:587
# Where will the mail seem to come from?
rewriteDomain=
# The full hostname
hostname=gmail.com
AuthUser=*MyEmail
AuthPass=*MyPassword*
UseSTARTTLS=YES
And my ipfw rule to allow smtp gmail's server:
Code:
$IPF 800 allow tcp from smtp.gmail.com 587 to me
So far so good. At this point(considering I just rebooted my server) I'm perfectly able to send all emails that I want.
The problem is, after some days the IP of that address(smtp.gmail.com) changes(In fact everytime time you ping it will show up with a different IP than the previous).
I could simply reload ipfw.rules and it will update the IP but because of this line in my sysctl.conf
Code:
net.inet.tcp.blackhole=2
I'm getting this errors in my messages log file:
Code:
Oct 29 12:01:23 kernel: TCP: [74.125.140.108]:587 to [192.168.1.85]:48490 tcpflags 0x12<SYN,ACK>; tcp_input: Connection attempt to closed port
Oct 29 12:01:23 kernel: TCP: [74.125.140.108]:587 to [192.168.1.85]:48490 tcpflags 0x12<SYN,ACK>; tcp_input: Connection attempt to closed port
Oct 29 12:01:24 kernel: TCP: [74.125.140.108]:587 to [192.168.1.85]:48490 tcpflags 0x12<SYN,ACK>; tcp_input: Connection attempt to closed port
Oct 29 12:01:25 kernel: TCP: [74.125.140.108]:587 to [192.168.1.85]:48490 tcpflags 0x12<SYN,ACK>; tcp_input: Connection attempt to closed port
Oct 29 12:01:27
Is there anything I can do to solve this instead of rebooting my system every time emails stops working? I believe what I have to do is allowing the kernel to accept the new IP. Just a theory as I am a newbie.
When I do
[CMD=""]sockstat -4[/CMD]
Should it show a entry like *.*.*.*:587 ? Could be this what is causing my problem?