0

So I am not sure what I am doing wrong. This all started with the need to let others from outside our network access the SMTP to send email from offsite.

So I had in /etc/postfix a check_clients file, for a test I added my external IP address of my house.

Then I ran:

postmap check_clients to make/update the client.db I suspect I have to update or restart postfix to get this to take? But not sure how since it claims it is not running. I inherited this email server and really don't know what is going on with it but trying to come up to speed fast. It looks like it is running courier-imap.

A ps aux | grep postfix givs nothing a ps aux | grep smtp gives:

postfix  23310  0.0  0.1 192172  7376 ?        S    04:36   0:00 smtpd -n smtp -t inet -u -o stress= -o smtpd_sasl_auth_enable=yes -o receive_override_options=no_address_mappings -o content_filter=smtp-amavis:127.0.0.1:10024
postfix  23330  0.0  0.0  92392  4840 ?        S    04:36   0:00 smtp -n smtp-amavis -t unix -u -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes
postfix  23334  0.0  0.1 174872  6888 ?        S    04:36   0:00 smtpd -n 127.0.0.1:10025 -t inet -u -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000
postfix  23388  0.0  0.1 192172  7380 ?        S    04:37   0:00 smtpd -n smtp -t inet -u -o stress= -o smtpd_sasl_auth_enable=yes -o receive_override_options=no_address_mappings -o content_filter=smtp-amavis:127.0.0.1:10024
postfix  24037  0.0  0.1 118332  6812 ?        S    04:49   0:00 smtpd -n smtps -t inet -u -o stress= -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
postfix  24045  0.0  0.0  92392  4840 ?        S    04:49   0:00 smtp -n smtp-amavis -t unix -u -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes
postfix  24111  0.0  0.1 100880  6012 ?        S    04:50   0:00 smtpd -n 127.0.0.1:10025 -t inet -u -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000
root     24131  0.0  0.0 112788   684 pts/0    R+   04:51   0:00 grep --color=auto smtp

I am not sure why I cannot send an email from my mac which when I am on site, sends fine. Here gives a time out on the SMTP connection. I thought it was in that check_clients file not having my IP address for at home. But I feel I could also be way off as for some odd reason I can send/receive email from my outlook on my android no matter what network I am on?

I am 99.9% sure I have the right connection settings in my applemail app too. Not sure what else to look at or to try. Some users claim they can send from their mac mail or thunderbird etc when offsite, and others cannot. Hence why I think this article:

http://www.postfix.org/RESTRICTION_CLASS_README.html

To try to change the smtp_recipient_restrictions and add my ip address too, just not sure how to get whatever mail server I am running to pick that up since postfix reload failed as it claims it is not running :/

Codejoy
  • 107
  • 5
  • 17
  • What does "fuser -n tcp 25" tell you? This should tell you is something is bound to port 25. My guess is postfix is not running, although there are child processes that are. Try /etc/init.d/postfix restart and see what it comes back with - including in the logs. – davidgo Apr 22 '20 at 08:25
  • 25/tcp: 5672 5677 5930 6589. If postfix is not running it still means that means some other service/system is acting as a mail server (sorry I am not a sys admin by nature, just trying to figure this out...slowly). I know the mail server is definitely running can log into web mail version of it and send emails and others can too... – Codejoy Apr 22 '20 at 08:28
  • OK, so postfix is running. Good. What does your log say when you try and send an email? Does it fail to open a connection, or fail to accept the message? What does your postfix configuration say? – davidgo Apr 22 '20 at 08:40
  • From my client it says connection to outgoing server (SMTP) timed out. On the server in /var/log/maillog I see no errors come across? If I send mail from the squirrelmail webmail then I get info on the message sent from postfix/smtp, and amavis even too. – Codejoy Apr 22 '20 at 09:00
  • by postfix configuration you mean main.cf? There was in main.cf a smtpd_recipient_restrictions that has a line: check_client_access hash:/etc/postfix/check_clients, this is where I added my IP address with an OK for a test, but didn't know what to do to refresh the file so to speak, if I have to do nothing I still cannot send out from my home so then I am on the wrong path to fixing this. – Codejoy Apr 22 '20 at 09:05
  • Have you checked the systems firewall? Did you attempt a /etc/init.d/postfix reload - that will reread conf files. Also, is their a bind address in the postfix conf file? Maybe its only binding to localhost rather then all interfaces? – davidgo Apr 22 '20 at 09:20
  • the inet_interfaces=all in the main.cf file, and I double checked the firewall the smtp services are all added as permanent to firewall-cmd --list-services permanent so I think that is good. Oddly there is no /etc/init.d/postfix reload that is what I am trying to figure out how to reload this particular install of postfix. I seriously do not know why all postfix commands act as if it is not running. Something is certainly running my mailserver, and I know for a fact using main.cf as its configuration. – Codejoy Apr 22 '20 at 17:19

0 Answers0