DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th June 2015
chuckdevguy chuckdevguy is offline
New User
 
Join Date: Jun 2015
Posts: 6
Default sendmail slower after 9 to 10 upgrade

Since upgrading from 9-rel to 10-rel sendmail is pausing for 5-8 seconds below:


mail -v -s "test from web1" test@test.com

.
EOT

test@test.com... Connecting to [127.0.0.1] via relay...


***the above line takes 5 seconds then the rest of the output is quick and sends the e-mail fine




220 web1.ctest.net ESMTP Sendmail 8.14.9/8.14.9; Fri, 19 Jun 2015 14:50:52 -0400 (EDT)
>>> EHLO web1.ctest.net
250-web1.ctest.net Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-STARTTLS
250-DELIVERBY
250 HELP
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO web1.ctest.net
250-web1.ctest.net Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<c@web1.ctest.net> SIZE=42
250 2.1.0 <c@web1.ctest.net>... Sender ok
>>> RCPT To:<test@test.com>
>>> DATA
250 2.1.5 <test@test.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 t5JIoqOn021612 Message accepted for delivery
test@test.com... Sent (t5JIoqOn021612 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 web1.ctest.net closing connection



resolvers are both good and working. hosts file is fine. I have an old machine on the same lan that works ok so it's not the FW....i'm stumped..and always on a friday!
Reply With Quote
  #2   (View Single Post)  
Old 19th June 2015
chuckdevguy chuckdevguy is offline
New User
 
Join Date: Jun 2015
Posts: 6
Default

[root@web1 /etc/mail/certs]# dig -x 127.0.0.1
Code:
; <<>> DiG 9.10.2 <<>> -x 127.0.0.1

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5054

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;1.0.0.127.in-addr.arpa.                IN      PTR

;; ANSWER SECTION:

1.0.0.127.in-addr.arpa. 1800    IN      PTR     localhost.

;; Query time: 0 msec

;; SERVER: 10.1.1.2#53(10.1.1.2)

;; WHEN: Fri Jun 19 17:32:00 EDT 2015

;; MSG SIZE  rcvd: 63
[root@web1 /etc/mail/certs]# cat /etc/hosts

Code:
::1             localhost localhost.mydomain.net
127.0.0.1       localhost localhost.mydomain.net
10.1.1.39       web1.ctest.net  web1
10.1.1.39       web1.ctest.net.

same results with : 

::1               localhost  web1.ctest.net  web1 web1.ctest.net.
127.0.0.1      localhost  web1.ctest.net  web1 web1.ctest.net.

Last edited by chuckdevguy; 20th June 2015 at 05:23 AM. Reason: more info
Reply With Quote
  #3   (View Single Post)  
Old 20th June 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,562
Default

Hello, and welcome!

You mention resolvers are good, and you show us you get a reverse lookup of 127.0.0.1 to localhost in 0 milliseconds, but what you didn't show is is the resolution time for test.com, the FQDN you were sending your test mail to.

I'll guess that $ dig test.com might not resolve so quickly.

--------

Edited to add a second guess, which is probably better.

My second guess is that you have a mismatch between the forward DNS resolution for test.com, and the reverse DNS resolution of localhost, and sendmail is therefore waiting for a resolution timeout.

Last edited by jggimi; 20th June 2015 at 01:46 PM. Reason: added forward/reverse resolution mismatch
Reply With Quote
  #4   (View Single Post)  
Old 20th June 2015
chuckdevguy chuckdevguy is offline
New User
 
Join Date: Jun 2015
Posts: 6
Default

thanks for the welcome and reply!

Here's the output for another few domains as well:



# dig test.com
Code:
; <<>> DiG 9.10.2 <<>> test.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40757
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;test.com.                      IN      A

;; ANSWER SECTION:
test.com.               3600    IN      A       23.91.14.101

;; AUTHORITY SECTION:
test.com.               172800  IN      NS      ns66.worldnic.com.
test.com.               172800  IN      NS      ns65.worldnic.com.

;; Query time: 87 msec
;; SERVER: 10.1.1.2#53(10.1.1.2)
;; WHEN: Sat Jun 20 16:09:14 EDT 2015
;; MSG SIZE  rcvd: 100

# dig -x google.com
Code:
; <<>> DiG 9.10.2 <<>> -x google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 29078
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;com.google.in-addr.arpa.       IN      PTR

;; AUTHORITY SECTION:
in-addr.arpa.           5       IN      SOA     b.in-addr-servers.arpa. nstld.iana.org. 2014054330 1800 900 604800 3600

;; Query time: 47 msec
;; SERVER: 10.1.1.2#53(10.1.1.2)
;; WHEN: Sat Jun 20 16:10:37 EDT 2015
;; MSG SIZE  rcvd: 120

The delay line actually happens to any e-mail domain I try so I haven't been looking into the destination domain much.

There is no ip6 in my rc.conf for it to delay on either. The delay is 5-8 seconds which isn't the typical 30 I'm used to for dns stuff.

Is there a new or changed sendmail configuration I should look into?
The sendmail config file is cryptic to me

Last edited by chuckdevguy; 20th June 2015 at 08:27 PM. Reason: config question
Reply With Quote
  #5   (View Single Post)  
Old 20th June 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,562
Default

Now you've confused me. * If the test.com you are resolving is the "real" test.com, why then does your log in your first post resolve it to the loopback address?

For further problem source identification, I would turn to a network monitoring tool such as tcpdump(8) and see if the delay source can be determined.

---
* Don't worry, it happens all the time.
Reply With Quote
  #6   (View Single Post)  
Old 21st June 2015
chuckdevguy chuckdevguy is offline
New User
 
Join Date: Jun 2015
Posts: 6
Default

I'm going to look into how to use tcpdump since you mentioned it. Never tried it before.


To get a clearer view, here's a another run of the command to gmail with the same results.

I've included date before and after, maybe someone can try to time their results to their own email if running 10.1-rel ?



$ date && echo "hi" | mail -v -s "subject" my.gmail.acct@gmail.com && date

Code:
Sun Jun 21 12:42:04 EDT 2015

my.gmail.acct@gmail.com... Connecting to [127.0.0.1] via relay...

** the usual 5-8 sec delay issue **

220 machine.mydomain.net ESMTP Sendmail 8.14.9/8.14.9; Sun, 21 Jun 2015 12:42:09 -0400 (EDT)
>>> EHLO machine.mydomain.net
250-machine.mydomain.net Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-STARTTLS
250-DELIVERBY
250 HELP
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO machine.mydomain.net
250-machine.mydomain.net Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<devuser@machine.mydomain.net> SIZE=44
250 2.1.0 <devuser@machine.mydomain.net>... Sender ok
>>> RCPT To:<my.gmail.acct@gmail.com>
>>> DATA
250 2.1.5 <my.gmail.acct@gmail.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 t5LGg9KA005899 Message accepted for delivery
my.gmail.acct@gmail.com... Sent (t5LGg9KA005899 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 machine.mydomain.net closing connection

Sun Jun 21 12:42:09 EDT 2015
Reply With Quote
  #7   (View Single Post)  
Old 21st June 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,562
Default

Quote:
Originally Posted by chuckdevguy View Post
I'm going to look into how to use tcpdump since you mentioned it. Never tried it before.
This gives me the opportunity to plug a wonderful book: Michael W. Lucas recently published Networking for System Administrators. Check out the reviews -- none less than 5 stars.
You may recognize his name, as he's published a number of well recognized FreeBSD books, including Absolute FreeBSD, FreeBSD Mastery: Storage Essentials, and the very recently published FreeBSD Mastery: ZFS. With "N4SA" at hand, not only will you learn about tcpdump(8), but you'll learn a lot about the rest of network management, problem source identification, and how to speak to network engineers with their terminology.
Quote:
...maybe someone can try to time their results to their own email if running 10.1-rel ?
Maybe. But I think you'd have better luck with tcpdump traces, which log to the microsecond. I can't recreate your problem, as I've never used FreeBSD, and haven't used sendmail in many years.
Reply With Quote
  #8   (View Single Post)  
Old 22nd June 2015
chuckdevguy chuckdevguy is offline
New User
 
Join Date: Jun 2015
Posts: 6
Default

well, just to conclude the thread:

I replaced sendmail with postfix and everything works out of the box. something is going on with sendmail around freebsd version 10.1-rel from what i've read in the freebsd mailinglist.

postfix looks to have a well documented website with some real world scenarios. sendmail just seems overall cryptic to me.

no solution, but maybe this can save someone else a day of tinkering
Reply With Quote
Reply

Tags
sendmail

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
is filesystem slower because of some security enhancement ? daemonfowl OpenBSD Security 3 17th September 2012 03:26 AM
Synaptics touchpad is slower on OpenBSD 5.2 -current daemonfowl OpenBSD General 4 26th June 2012 05:20 PM
Sendmail TLS gpatrick OpenBSD General 5 26th February 2011 01:42 AM
Sendmail Timmy66 OpenBSD General 11 19th October 2008 03:01 PM
Sendmail, issues... pcfxer FreeBSD General 2 8th May 2008 10:07 AM


All times are GMT. The time now is 01:31 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick