Upgraded to version 67 and now outgoing mail doesn’t work. Posqueue -p has mail backing up in it. If i ping smtp.lapnap.org is no longer resolves to an ip address. Not sure what to do, i tried postqueue -f and no luck.
Try checking to see if DNS is running…
DNS is working, but I don’t see smtp listed as a record. also mail is not sending, just piling up according to postqueue -p
(connect to smtpin02.vzw.a.cloudfilter.net[35.167.120.54]:25: Connection timed out)
(connect to alt2.aspmx.l.google.com[2607:f8b0:4023:401::1b]:25: Network is unreachable)
is what postqueue -p shows. ive tried restarting nsd
I can see from your message that DNS resolution is working fine. It looks to me like your outbound port 25 access is being blocked. What did you upgrade from? Did your IP address change?
✓ | SSH disallows password-based login. |
---|---|
✓ | System software is up to date. |
✓ | Mail-in-a-Box is up to date. You are running version v67. |
✓ | System administrator address exists as a mail alias. [administrator@box.lapnap.org ↦ tim@lapnap.org] |
✓ | The disk has 41.99 GB space remaining. |
✓ | System memory is 49% free. |
✓ | Firewall is active. |
---|---|
✓ | Outbound mail (SMTP port 25) is not blocked. |
✓ | IP address is not blacklisted by zen.spamhaus.org. |
box.lapnap.org | |
✓ | DNSSEC ‘DS’ record is set correctly at registrar. |
✓ | Nameserver glue records are correct at registrar. [ns1/ns2.box.lapnap.org ↦ 52.33.19.184] |
✓ | Domain resolves to box’s IP address. [box.lapnap.org ↦ 52.33.19.184 / 2600:1f14:335:e900:f62e:6acb:62ec:bc40] |
I upgraded from 62 and ip hasn’t changed. above is the status page
Are you able to manually connect to port 25 of those 2 addresses from your MiaB server?
You can try this using telnet:
telnet 35.167.120.54 25
and
telnet 2607:f8b0:4023:401::1b 25
ubuntu@box:~$ postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
BF3203F1CB 4978669 Wed Feb 7 15:03:21 Dave@lapinenapa.com
(Host or domain name not found. Name service error for name=smtp.lapnap.org type=A: Host not found)
southcountyshopper@lapine.org
65C3E3F1DD 4978609 Wed Feb 7 15:07:43 Dave@lapinenapa.com
(Host or domain name not found. Name service error for name=smtp.lapnap.org type=A: Host not found)
terryonitswayhome@gmail.com
and
tim@DCW10-J5Q21QO:~$ telnet box.lapnap.org 25
Trying 52.33.19.184…
Connected to box.lapnap.org.
Escape character is ‘^]’.
220 box.lapnap.org ESMTP Hi, I’m a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)
ubuntu@box:~$ telnet 35.167.120.54 25
Trying 35.167.120.54…
Connected to 35.167.120.54.
Escape character is ‘^]’.
not sure if this really connected?
Yes, they connected.
It looks like it’s complaining that it cannot lookup smtp.lapnap.org. Which is odd. It shouldn’t be doing that. Furthermore, you don’t have your IPv6 PTR record setup, so that will cause problems if your MiaB server tries to use IPv6 for sending email (which it is doing above with google).
- make sure the reverse DNS is set for IPv6 on your server.
- try to figure out why smtp.lapnap.org is suddenly in play.
(Host or domain name not found. Name service error for name=smtp.lapnap.org type=AAAA: Host not found)
dave_napalapine@outlook.com
BF3203F1CB 4978669 Wed Feb 7 15:03:21 Dave@lapinenapa.com
(Host or domain name not found. Name service error for name=smtp.lapnap.org type=AAAA: Host not found)
southcountyshopper@lapine.org
BBC403FAD4 6643 Thu Feb 8 14:07:33 tim@lapnap.org
(Host or domain name not found. Name service error for name=smtp.lapnap.org type=AAAA: Host not found)
elizabeth@wrperformanceproducts.com
269AE3F79A 63929 Thu Feb 8 12:53:56 Dave@lapinenapa.com
(delivery temporarily suspended: Host or domain name not found. Name service error for name=smtp.lapnap.org type=AAAA: Host not found)
chris@napalapine.com
now these are starting to stack up. I have fixed reverse for IPv6
I’m not sure what to do from here and company outgoing emails are stacking up… Any suggestions? I need to figure this out, mailinabox has worked great for 6 months and now this… I won’t update again if I can get this back to working!
You are going to need to figure out why it’s trying to use the name smtp.lapnap.org. That’s incorrect. It should be box.lapnap.org. I just grep’ed recursively through my entire /etc directory and there is zero instances of smtp.myserver.com in there.
I would start start by looking for places this name appears in your system.
Recursive grep can be done like this:
sudo grep -rs smtp.lapnap.org /etc
Also, are you using external DNS or letting MiaB handle DNS? Go to your admin page box.lapnap.org - Mail-in-a-Box Control Panel, go into the “external DNS” page and search for occurrences of “smtp” on that page. I have none on my server.
I guess I should start with the basics. What is the hostname of your MiaB mail server? Let’s say your domain is lapnap.org
. The recommended is “box”, so it would be box.lapnap.org
. I don’t use “box”. I use “mail”, so mine is mail.myserver.com
. But there seems to be confusion here, because your initial post is that you cannot resolve “smtp.lapnap.org”. Later on in postings I see “box.lapnap.org” showing up. There has to be one name. Maybe that has become confused.
Also, /etc/mailinabox.conf will show the name (at least the name that MiaB thinks it should be). Also, I would recommend whatever name you choose, you put that name in /etc/hostname. And don’t change the name. That will probably not work out as cleanly as you would expect.
To make sure your MiaB is working internally, I suggest you try the following steps and see if it will send an email to a local email account.
-
Start telnet using: lapnap.org:
telnet lapnap.org 25
Output:
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 box.lapnap.org ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)
-
Introduce your domain using the EHLO command:
ehlo lapnap.org
Output:
250-box.lapnap.org 250-PIPELINING 250-SIZE 134217728 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250 CHUNKING
-
Set “mail from” to tim@lapnap.org:
mail from: tim@lapnap.org
Output:
250 2.1.0 Ok
-
Set the recipient email address also to a tim@lapnap.org:
rcpt to: tim@lapnap.org
Output:
250 2.1.5 Ok
-
Run data command:
data
Output:
354 End data with <CR><LF>.<CR><LF>
-
Paste the following text:
subject: Internal Mail-in-a-Box email test Just sent an email to myself. Thanks, SysAdmin .
Output:
250 2.0.0 Ok
-
Terminate the session with the quit command:
quit
Output:
221 2.0.0 Bye Connection closed by foreign host.
Check if tim@lapnap.org received an email.
If you didn’t receive an email, look for the email you just used in the mail.log file located at:
/var/log/mail.log
Check if there is an error message and what the error number is.
I suspect that at some point the postfix server configuration was changed from box.lapnap.org to smtp.lapnap.org.
You can search the term “smtp.lapnap.org” in /etc directory as follows:
grep -irl "smtp.lapnap.org" /etc
This will list all files that contains the term “smtp.lapnap.org”.
Then repeat the search also for the term “box.lapnap.org” as follow:
grep -irl "box.lapnap.org" /etc
My grep output looks like this:
/etc/munin/munin-node.conf
/etc/munin/munin.conf
/etc/dovecot/conf.d/15-lda.conf
/etc/mailinabox.conf
/etc/postfix/outgoing_mail_header_filters
/etc/postfix/main.cf
/etc/hostname
/etc/opendkim/KeyTable
/etc/opendkim/SigningTable
/etc/nginx/conf.d/local.conf
/etc/nsd/zones/box.mydomain.tld.txt.ds
/etc/nsd/zones/box.mydomain.tld.txt
/etc/nsd/zones/mydomain.tld.txt
/etc/nsd/zones/box.mydomain.tld.txt.signed
/etc/nsd/zones/mydomain.tld.txt.signed
/etc/aliases.db
You can compare the output given for “smtp” and for “box” to see if there is actually a misconfiguration that points to “smtp” instead of “box”.
ok…
I grep’d and only place i saw it was in relay host setting in /etc/postfix/main.cf
I removed that entry in the file.
My box has been box.lapnap.org and i never changed it.
I was able to send mail to myself by telnetting in, that worked just fine.
after removing it, i got this now:
ubuntu@box:~$ sudo postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
B9B353F79B* 1405498 Thu Feb 8 16:35:18 Dave@lapinenapa.com
jeremy@youngelectricco.com
B40F73F79C* 15435 Thu Feb 8 12:55:10 Dave@lapinenapa.com
dave_napalapine@outlook.com
65C3E3F1DD* 4978609 Wed Feb 7 15:07:43 Dave@lapinenapa.com
terryonitswayhome@gmail.com
269AE3F79A* 63929 Thu Feb 8 12:53:56 Dave@lapinenapa.com
chris@napalapine.com
BF3203F1CB* 4978669 Wed Feb 7 15:03:21 Dave@lapinenapa.com
southcountyshopper@lapine.org
BBC403FAD4* 6643 Thu Feb 8 14:07:33 tim@lapnap.org
elizabeth@wrperformanceproducts.com
42EDA3F79D* 32139 Thu Feb 8 13:49:07 3cx@lapnap.org
chris@napalapine.com
ALSO in the file /etc/mailinabox.conf the name is box.lapnap.org
so, removing the smtp relay from the main.cf file and rebooting, caused lookup failures and I then changed /etc/resolv.conf to have nameserver other than localhost and the mails have all sent out!! Why it keeps changing my resolv.conf is crazy but for now its working!!! Thank you for all the help!!!
Regarding your “resolv.conf” reset issue, see this post and then head over to this post that explains how to set a permanent resolv.conf file using “netplan”
My yaml file looks like this:
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: false
dhcp6: false
addresses:
- xxx.xxx.xxx.xxx/xx # Your IPv4 public address.
- "xxxx:xxxx:xxxx:xxxx::xxxx/xx" # Your IPv6 primary address.
gateway4: xxx.xxx.xxx.xxx # Your IPv4 gateway.
gateway6: "xxxx::xxxx" # Your IPv6 gateway.
nameservers:
search: [some.domain.com] # Most times this is provided by your cloud service provider.
addresses: # DNS Server IP addresses.
- 127.0.0.1
- ::1
Thank you for all the help! You guys are amazing!!