Sponsored Content
Operating Systems OS X (Apple) fetchmail and postfix mail setup on Snow Leopard - request for guidance Post 302582952 by butterbaerchen on Tuesday 20th of December 2011 05:42:59 PM
Old 12-20-2011
... later

I do get mails into the Mailbox File - and can read them fine - mbox format
fetchmails smtp transaction error with localhost (my machine) is mentioned on the net - some people say it happened when leopard turned
to snow leopard.
The mail.server certificate I downloaded is there but checking it has to be turned off in postfix by changing the value:
Code:
smtp_tls_security_level = secure

to = encrypt, otherwise the tls handshake wont go through - no mail (postfix that is)
and that changes "Trusted TLS Connection established" to "Untrusted TLS Connection ...".
sending mail from the commandline works - as roadie to gmail produces an email sent from 'roadie@roadiemac.bigpond' with my full name
as sender in gmail. I have to figure out how to map 'user@domain.org' to roadie (local user).
I will go and see if there are other mail setups for what I would like to have. Maybe someone here has a suggestion.

get pop3 mail, nokeep on server, put into mbox files for reading on one machine - Dynamic DNS - Sometimes online so need to be able to write
offline and send when going online without using a gui client, that would be nice. Smilie

Ok, now. fetchmaillog - polling 3 mailaddresses on one mailserver


Code:
fetchmail: 6.3.11 querying mail.server.com (protocol POP3) at Mon, 19 Dec 2011 13:56:24 +1000 (EST): poll completed
fetchmail: normal termination, status 0
fetchmail: Server certificate verification error: unable to get local issuer certificate
fetchmail: Server certificate verification error: certificate not trusted
fetchmail: Server certificate verification error: unable to verify the first certificate
fetchmail: 1 message for user@domain.org at mail.server.com (2308 octets).
fetchmail: reading message user@domain.org@mail.server.com:1 of 1 (2308 octets) (log message incomplete)
fetchmail: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused.
fetchmail: connection to localhost:smtp [::1/25] failed: Connection refused.
fetchmail: connection to localhost:smtp [fe80::1%lo0/25] failed: Connection refused.
fetchmail: SMTP connect to localhost failed
fetchmail: SMTP transaction error while fetching from user@domain.org@mail.server.com and delivering to SMTP host localhost
fetchmail: Query status=10 (SMTP)
fetchmail: Server certificate verification error: unable to get local issuer certificate
fetchmail: Server certificate verification error: certificate not trusted
fetchmail: Server certificate verification error: unable to verify the first certificate
fetchmail: 1 message for user2@domain.org at mail.server.com (2304 octets).
fetchmail: reading message user2@domain.org@mail.server.com:1 of 1 (2304 octets) (log message incomplete)
fetchmail: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused.
fetchmail: connection to localhost:smtp [::1/25] failed: Connection refused.
fetchmail: connection to localhost:smtp [fe80::1%lo0/25] failed: Connection refused.
fetchmail: SMTP connect to localhost failed
fetchmail: SMTP transaction error while fetching from user2@domain.org@mail.server.com and delivering to SMTP host localhost
fetchmail: Query status=10 (SMTP)
fetchmail: No mail for user3@domain.org at mail.server.com

And here is the latest .fetchmailrc

Code:
#### .fetchmailrc
set syslog
set postmaster "roadie"
set no spambounce
set properties ""
set logfile /Users/roadie/fetchmail.log
poll mail.server.com proto pop3:
user "user@domain.org", with password "password", is "roadie" here options ssl sslcertck sslcertpath '/Users/roadie/.certs' nokeep
poll mail.server.com proto pop3:
user "user2@domain.org", with password "password2", is "roadie" here options ssl sslcertck sslcertpath '/Users/roadie/.certs' nokeep
poll mail.server.com proto pop3:
user "user3@domain.org", with password "password3", is "roadie" here options ssl sslcertck sslcertpath '/Users/roadie/.certs' nokeep
fetchall
no rewrite
sslfingerprint "17:F7:F2:FF:4A:9D:C3:D3:2B:8A:E9:12:47:C4:A4:28"
mda '/usr/bin/procmail -d %T'

here are the activated 'options' in /etc/postfix/main.cf

entries I changed / created

Code:
myhostname = roadiemac.bigpond
myorigin = domain.org
local_recipient_maps =
home_mailbox = Mailbox
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
relayhost = [mail.server.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_pass
# Warn on everything
notify_classes = bounce, delay, policy, protocol, resource, software
smtp_sasl_security_options = 
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/postfix/CAcert.pem
smtp_tls_loglevel = 1

default entries - already present as far as I know

Code:
queue_directory = /private/var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = _postfix
unknown_local_recipient_reject_code = 550
debug_peer_level = 2
debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = _postdrop
dovecot_destination_recipient_limit = 1
mailbox_size_limit = 0
smtpd_tls_exclude_ciphers = SSLv2, aNULL, ADH, eNULL
mydomain_fallback = localhost
message_size_limit = 10485760
biff = no
mynetworks = 127.0.0.0/8
recipient_delimiter = +
tls_random_source = dev:/dev/urandom

here is a maillog part

Code:
 fetchmail[484]: 1 message for user3@domain.org at mail.server.com (3816 octets).
 fetchmail[484]: reading message user3@domain.org@mail.server.com:1 of 1 (3816 octets) flushed
 postfix/qmgr[462]: 1DE2121859F: from=<n_ausnz_i_bounces@insideapple.apple.com>, size=23055, nrcpt=1 (queue active)
 postfix/qmgr[462]: CEC9021859A: from=<n_ausnz_i_bounces@insideapple.apple.com>, size=23063, nrcpt=1 (queue active)
 postfix/smtp[513]: setting up TLS connection to mail.server.com[mailserverIP]:587
 postfix/smtp[514]: setting up TLS connection to mail.server.com[mailserverIP]:587
 postfix/smtp[513]: Untrusted TLS connection established to mail.server.com[mailserverIP]:587: TLSv1 with cipher ADH-AES256-SHA (256/256 bits)
 postfix/smtp[514]: Untrusted TLS connection established to mail.server.com[mailserverIP]:587: TLSv1 with cipher ADH-AES256-SHA (256/256 bits)
 postfix/smtp[513]: 1DE2121859F: to=<user3@domain.org>, relay=mail.server.com[mailserverIP]:587, delay=1741, delays=1738/0.03/2.5/1.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4B6FA48048)
 postfix/qmgr[462]: 1DE2121859F: removed
 postfix/smtp[514]: CEC9021859A: to=<user@domain.org>, relay=mail.server.com[mailserverIP]:587, delay=1748, delays=1744/0.03/2.5/1.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5893D480AF)
 postfix/qmgr[462]: CEC9021859A: removed
 fetchmail[518]: 1 message for user@domain.org at mail.server.com (24039 octets).
 postfix/smtpd[519]: connect from localhost[127.0.0.1]
 postfix/smtpd[519]: 805E92186AA: client=localhost[127.0.0.1]
 postfix/cleanup[521]: 805E92186AA: message-id=<1889296697.111732202.1324274931483.JavaMail.cboxp@ednabay.apple.com>
 fetchmail[518]: reading message user@domain.org@mail.server.com:1 of 1 (24039 octets) flushed
 postfix/qmgr[462]: 805E92186AA: from=<n_ausnz_i_bounces@insideapple.apple.com>, size=24360, nrcpt=1 (queue active)
 postfix/local[523]: 805E92186AA: to=<roadie@localhost.bigpond>, orig_to=<roadie@localhost>, relay=local, delay=0.57, delays=0.49/0.08/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
 postfix/qmgr[462]: 805E92186AA: removed
 postfix/smtpd[519]: disconnect from localhost[127.0.0.1]
 fetchmail[518]: No mail for user2@domain.org at mail.server.com

---------- Post updated 12-20-11 at 07:58 PM ---------- Previous update was 12-19-11 at 09:30 PM ----------

might as well go slow and pay attention.
so, I learned that the machine has at least 3 names that I can set
Code:
sudo scutil --set ComputerName newName
sudo scutil --set HostName newName
sudo scutil --set LocalHostName newName

what are mine at the moment:
Code:
RoadieMac:~ roadie$ sudo scutil --get HostName
HostName: not set
RoadieMac:~ roadie$ sudo scutil --get LocalHostName
RoadieMac
RoadieMac:~ roadie$ sudo scutil --get ComputerName
RoadieMac

so my hostname got set by the router I guess
Code:
RoadieMac:~ roadie$ hostname
RoadieMac.local

I set them all, only changing the Caps to small, in the logs there are no caps either ... ( I think). maybe someone has a hint for me.

---------- Post updated 12-21-11 at 01:14 AM ---------- Previous update was 12-20-11 at 07:58 PM ----------

I fixed it. remember Tom Hanks dancing around the fire on that island? yes.

Seems I had the old openssl 0.9.8 - so I went and installed the new
one 1.0.0 something (which happens to produce a different hash for my beloved mailserver certificate ... cute)
Quote:
for 0.9.8, you get 17a3f64c.0 -> ndn.ca.pem
for 1.0.0, you get 05e36882.0 -> ndn.ca.pem instead
so: ./configure > make > make test > sudo make install
Code:
ALL TESTS SUCCESSFUL.
OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
OpenSSL 1.0.0e 6 Sep 2011
built on: Tue Dec 20 23:06:23 EST 2011
platform: darwin64-x86_64-cc
options:  bn(64,64) rc4(1x,char) des(idx,cisc,16,int) idea(int) blowfish(idx) 
compiler: cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DWHIRLPOOL_ASM
OPENSSLDIR: "/usr/local/ssl"

Cook the certificate, not the crust
Convert .crt to .pem via .der :
Code:
roadiemac:.certs roadie$ openssl x509 -in ndnca.crt -out ndnca.der -outform DER
roadiemac:.certs roadie$ openssl x509 -in ndnca.der -inform DER -out ndnca.pem -outform PEM

good. now do the c_rehash again.
Code:
roadiemac:~ roadie$ /usr/local/ssl/bin/c_rehash /Users/roadie/.certs
Doing /Users/roadie/.certs
ndnca.pem => 05e36882.0

done
now get fetchmail 6.3.21
Code:
./configure --with-ssl --disable-IMAP

now test fetchmail again ..... Y E S
Code:
fetchmail: 6.3.21 querying mail.server.com (protocol POP3) at Wed, 21 Dec 2011 00:26:34 +1000 (EST): poll completed
fetchmail: Merged UID list from mail.server.com: UID000-000000 = UNSEEN
fetchmail: discarding new UID list
fetchmail: 6.3.21 querying mail.server.com (protocol POP3) at Wed, 21 Dec 2011 00:26:34 +1000 (EST): poll started
fetchmail: Trying to connect to 111.111.111.111/995...connected.
fetchmail: Certificate chain, from root to peer, starting at depth 1:
fetchmail: Issuer Organization: New Dream Network, LLC
fetchmail: Issuer CommonName: New Dream Network Certificate Authority
fetchmail: Subject CommonName: New Dream Network Certificate Authority
fetchmail: Server certificate:
fetchmail: Issuer Organization: New Dream Network, LLC
fetchmail: Issuer CommonName: New Dream Network Certificate Authority
fetchmail: Subject CommonName: *.mail.server.com
fetchmail: mail.server.com key fingerprint: 17:F7:F2:FF:4A:9D:C3:D3:2B:8A:E9:12:47:C4:A4:28
fetchmail: mail.server.com fingerprints match.

... one step further towards the thunderbirddelete button, mail.app went overboard when I installed this OS - good night for now.

---------- Post updated at 08:42 AM ---------- Previous update was at 01:14 AM ----------

onto the next issue
Code:
Diagnostic-Code: X-Postfix; mail forwarding loop

 

4 More Discussions You Might Find Interesting

1. OS X (Apple)

MacPorts on Snow Leopard

Hello everyone. I was previously using MacPorts 1.8 on Mac OS 10.5.8 without any problems and everything was working well. I recently upgraded to Xcode 3.2 and Mac OS 10.6, since then my MacPorts installation has not been working at all. I deleted it and then reinstalled the .dmg from the... (1 Reply)
Discussion started by: HoldenCaulfield
1 Replies

2. OS X (Apple)

Alpine 2 on Snow Leopard

I've just installed Alpine on Snow Leopard but can't seem to get a default spell checker configured for it. What happened to spell? I can't find it at all on 10.6, must have been some changes. Does anyone know about the default unix spell checker on SL? Thanks! (0 Replies)
Discussion started by: platz
0 Replies

3. OS X (Apple)

Installing Oracle 10g on Snow Leopard using this tutorial

This tutorial. Which is a lovely tutorial, really, and was working up until this instruction: Now download db.zip installation archive and place it somewhere and unzip it: mkdir Install cd Install # download db.zip to this directory unzip db.zip cd db/Disk1 I didn't know how to... (1 Reply)
Discussion started by: khayraB
1 Replies

4. OS X (Apple)

Problem with mail attachment in Snow Leopard

Hi, We have few scripts that are run through jobs . It sends us daily reports (using mailx). This was working fine in Leopard. But in Snow Leopard there is problem with the attachments.Neither the attachment name is being displayed correctly(all it displays is "Mail Attachment") nor the format... (1 Reply)
Discussion started by: adash
1 Replies
All times are GMT -4. The time now is 01:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy