Edit : it works ! Strange... I just stopped the daemon, regenerated a new ssl key, and now it's OK !

Code: Select all
:0 Whc:msgid.lock
|formail -D 8192 msgid.cache
:0 a:
.duplicates/
Code: Select all
cd /tmp/mails
for i in * ;do procmail <$i && rm $i;done
beowulf wrote:
3.4 Making Postfix a Relay to our ISP:
As was mentioned in section 1.1, we can use Postfix to be an email relay and send any mail to our ISP's SMTP server before it hits the Internet. Please keep in mind, that this step is NOT needed if you intend to use Postfix as a full-blown MTA. This step is optional and should NOT be used if you have an MX record.
Email Client->Cyrus-SASL->Postfix->Cyrus-SASL->ISP SMTP Server->Internet
This is easily accomplished as well. Although it's not really needed, it may be needed with some ISP's or some network setups so I've included for anyone who may need it.
First you must create a file that holds our ISP's SMTP Server authentication information. The format is rather simple "[server] [user]:[pass]". Here's what one could look like if we used the information in chart 2.2 under the SMTP heading:Code: Select all
root@server # vi /etc/postfix/saslpass #original guide format #smtp.isp.com beo739:rsmtp-pass #added example line for sbcglobal in original format smtp.sbcglobal.yahoo.com our_sbcglobal_username@sbcglobal.net:our-sbc-password
Code: Select all
root@server # vi /etc/postfix/main.cf
# the name of our SMTP server of our ISP for relaying messages in original guide format
#relayhost = smtp.isp.com
# sbcglobal server in original guide format
relayhost=smtp.sbcglobal.yahoo.com
Code: Select all
root@server # dig smtp.sbcglobal.yahoo.com mx
; <<>> DiG 9.2.5 <<>> smtp.sbcglobal.yahoo.com mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29362
;; flags: qr rd; QUERY: 1, ANSWER: 3, AUTHORITY: 5, ADDITIONAL: 6
;; QUESTION SECTION:
;smtp.sbcglobal.yahoo.com. IN MX
;; ANSWER SECTION:
smtp.sbcglobal.yahoo.com. 653 IN CNAME smtp-sbc.mail.yahoo.com.
smtp-sbc.mail.yahoo.com. 108 IN CNAME smtp-sbc-v1.mail.vip.sc5.yahoo.com.
smtp-sbc-v1.mail.vip.sc5.yahoo.com. 1800 IN MX 1 nomail.yahoo.com.
Code: Select all
Jun 15 12:46:37 [postfix/qmgr] 7EF221057F1: from=<local_user@intra.net>, size=3556, nrcpt=1 (queue active)
Jun 15 12:47:07 [postfix/smtp] connect to nomail.yahoo.com[216.145.48.35]: Connection timed out (port 25)
Jun 15 12:47:07 [postfix/smtp] 7EF221057F1: to=<outside_user@gmail.com>, relay=none, delay=30, status=deferred (connect to nomail.yahoo.com[216.145.48.35]: Connection timed out)
Code: Select all
root@server # vi /etc/postfix/main.cf
# the name of our SMTP server of our ISP for relaying messages.
#relayhost = [smtp.isp.com]
# sbcglobal server
relayhost=[smtp.sbcglobal.yahoo.com]
Code: Select all
root@server # vi /etc/postfix/saslpass
# the name of our SMTP server of our ISP for relaying messages.
#[smtp.isp.com] beo739:rstmp-pass
#sbcglobal server
[smtp.sbcglobal.yahoo.com] our_sbcglobal_username@sbcglobal.net:our-sbc-password
Hope this helps and is clear. To reiterate the addition of brackets can't hurt exsisting working installs, but it does cause a few headaches without them. Just my 2 cents.beowulf wrote: After you've completed that, let's protect the file and hash it so postfix can work with it. We do this with the following commands:Code: Select all
root@server # /bin/chown root:root /etc/postfix/saslpass root@server # /bin/chmod 600 /etc/postfix/saslpass root@server # /usr/sbin/postmap hash:/etc/postfix/saslpass
Code: Select all
#/etc/postfix/main.cf
myhostname = localhost
mydomain = localdomain
inet_interfaces = $myhostname, localhost
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain
unknown_local_recipient_reject_code = 450
mynetworks_style = subnet
mynetworks = 127.0.0.0/8 192.168.1.1/24
mailbox_command = /usr/bin/procmail
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
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.0.16-r1/sample
readme_directory = /usr/share/doc/postfix-2.0.16-r1/readme
default_destination_concurrency_limit = 2
alias_database = hash:/etc/mail/aliases
local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases
home_mailbox = .maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_client_restrictions = permit_sasl_authenticated, reject
#smtpd_use_tls=yes
#smtpd_tls_auth_only = yes
#smtpd_tls_key_file = /etc/ssl/postfix/server.key
#smtpd_tls_cert_file = /etc/ssl/postfix/server.crt
#smtpd_tls_CAfile = /etc/ssl/postfix/server.pem
#smtpd_tls_loglevel = 3
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600s
#tls_random_source = dev:/dev/urandom
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpass
smtp_sasl_security_options = noanonymous Code: Select all
#/etc/sasl2/smtpd.conf
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/smtp.sasl,v 1.2 2004/07/18 03:26:56 dragonheart Exp $
pwcheck_method:saslauthd
mech_list: plain login
#/usr/lib/sasl2/smtpd.conf
pwcheck_method:saslauthd
mech_list: plain login
# /etc/conf.d/saslauthd
# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd-2.1.20.conf,v 1.1 2004/10/31 06:13:48 langthang Exp $
SASL_AUTHMECH=shadow
SASL_RIMAP_HOSTNAME=""
SASL_TIME_OF_DAY_LOGIN_RESTRICTIONS=yes
SASLAUTHD_OPTS="-a ${SASL_AUTHMECH}"
#/etc/postfix/saslpass
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/smtp.pass,v 1.2 2004/07/18 03:26:56 dragonheart Exp $
#
# remotehost user:password
smtp.suscom.net xxxxxxxxx:xxxxxxxxxCode: Select all
pbk1111@kosmo ~/bin $ /usr/bin/fetchmail -vvv -a -m "/usr/bin/procmail -d %T"
fetchmail: 6.2.5.2 querying gmail (protocol POP3) at Sat Jul 30 16:01:43 2005: poll started
fetchmail: Issuer Organization: Thawte Consulting cc
fetchmail: Issuer CommonName: Thawte Server CA
fetchmail: Server CommonName: pop.gmail.com
fetchmail: gmail key fingerprint: F2:BE:86:E4:E2:51:76:AA:B6:00:91:7B:97:A4:E6:F3
fetchmail: Warning: server certificate verification: unable to get local issuer certificate
fetchmail: Issuer Organization: Thawte Consulting cc
fetchmail: Issuer CommonName: Thawte Server CA
fetchmail: Server CommonName: pop.gmail.com
fetchmail: Warning: server certificate verification: certificate not trusted
fetchmail: Issuer Organization: Thawte Consulting cc
fetchmail: Issuer CommonName: Thawte Server CA
fetchmail: Server CommonName: pop.gmail.com
fetchmail: Warning: server certificate verification: unable to verify the first certificate
fetchmail: POP3< +OK Gpop 35pf2846136wra ready.
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows
fetchmail: POP3< USER
fetchmail: POP3< RESP-CODES
fetchmail: POP3< EXPIRE 0
fetchmail: POP3< LOGIN-DELAY 300
fetchmail: POP3< X-GOOGLE-VERHOEVEN
fetchmail: POP3< .
fetchmail: POP3> USER TEST@gmail.com
fetchmail: POP3< +OK send PASS
fetchmail: POP3> PASS *
fetchmail: POP3< +OK Welcome.
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 463
1 message for TEST@gmail.com at gmail (463 octets).
fetchmail: POP3> LIST 1
fetchmail: POP3< +OK 1 463
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK message follows
reading message TEST@gmail.com@gmail-pop.l.google.com:1 of 1 (463 octets)
#* flushed
fetchmail: POP3> DELE 1
fetchmail: POP3< +OK marked for deletion
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Farewell.
fetchmail: 6.2.5.2 querying gmail (protocol POP3) at Sat Jul 30 16:01:48 2005: poll completed
fetchmail: normal termination, status 0
Code: Select all
kosmo ~ # tail -f /var/log/messages
Jul 30 16:24:22 kosmo imapd: authentication error: Input/output error
Jul 30 16:25:49 kosmo imapd: Connection, ip=[::ffff:192.168.1.2]
Jul 30 16:26:30 kosmo authdaemond: failed to connect to mysql server (server=mysql.example.com, userid=admin): Unknown MySQL Server Host 'mysql.example.com' (1)
Jul 30 16:26:30 kosmo imapd: LOGIN FAILED, user=pbk1111, ip=[::ffff:192.168.1.2]
Jul 30 16:26:30 kosmo imapd: authentication error: Input/output error
Jul 30 16:27:47 kosmo imapd: Connection, ip=[::ffff:192.168.1.2]
Jul 30 16:27:47 kosmo imapd: Disconnected, ip=[::ffff:192.168.1.2], time=0
Jul 30 16:27:47 kosmo imapd-ssl: Connection, ip=[::ffff:192.168.1.2]
Jul 30 16:27:47 kosmo imapd-ssl: Unexpected SSL connection shutdown.
Jul 30 16:27:47 kosmo imapd-ssl: Disconnected, ip=[::ffff:192.168.1.2], time=0, starttls=1

Code: Select all
[11:35:53] ESMTP> AUTH LOGIN
[11:35:53] ESMTP< 334 VXNlcm5hbWU6
[11:35:53] ESMTP> [USERID]
[11:35:53] ESMTP< 334 UGFzc3dvcmQ6
[11:35:53] ESMTP> [PASSWORD]
[11:35:53] ESMTP< 235 Authentication successful
[11:35:53] ESMTP> MAIL FROM:<alunt2003@alunt2003@homelinux.org> SIZE=347
[11:35:53] SMTP< 250 Ok
[11:35:53] SMTP> RCPT TO:<alunt2003@yahoo.com>
[11:35:53] SMTP< 554 <alunt2003@yahoo.com>: Relay access denied
** error occurred on SMTP session
** Error occurred while sending the message.Code: Select all
mynetworks = 192.168.0.1/255, 127.0.0.1
to
mynetworks = 192.168.0.1/24, 127.0.0.0/8Code: Select all
Aug 28 16:45:41 alunt2003 postfix/smtp[23460]: 1C55D208F8E: to=<edited@btinternet.com>, relay=mx1.bt.mail.yahoo.com[195.50.106.135], delay=0, status=sent (250 ok dirdel)THANKS! That problem was driving me crazy.LLSLIM wrote:I ran into trouble when trying to send mail to my ISP due to a feature of postfix as described in the documentation of the relayhost option. Where postfix automatically tries to look up and connect to the machine in the domain name MX record (DNS MX) of the supplied "smtp.isp.com" address, and NOT directly to the "smtp.isp.com" machine unless it is enclosed by square brackets in both our /etc/postfix/main.cf and our /etc/postfix/saslpass files to disable MX record lookup by postfix.
Code: Select all
Oct 20 16:49:10 [imapd] Connection, ip=[::ffff:192.168.2.100]
Oct 20 16:49:10 [imapd] LOGIN FAILED, user=chojin, ip=[::ffff:192.168.2.100]
Oct 20 16:49:10 [imapd] authentication error: Input/output error
Oct 20 16:49:10 [authdaemond] failed to connect to mysql server (server=mysql.example.com, userid=admin): Unknown MySQL Server Host 'mysql.example.com' (1)
Code: Select all
/etc/init.d/courier-imapd-ssl start
* Starting courier-authlib: authdaemond ... [ ok ] * Starting courier-imapd over SSL ...
bind: Address already in use
ll_daemon_start: Resource temporarily unavailable [ !! ]
A restart fixed the problem!mxa055 wrote:Hi there,
I am getting this error when trying to start courier-imap-ssl
Code: Select all
/etc/init.d/courier-imapd-ssl start * Starting courier-authlib: authdaemond ... [ ok ] * Starting courier-imapd over SSL ... bind: Address already in use ll_daemon_start: Resource temporarily unavailable [ !! ]
Some people already mentioned that they have solved this issue but don't point to the solution.
Any help?
Regards,
Michael
Code: Select all
procmail: Missing recipient
sh: line 1: andreas: command not found
fetchmail: MDA returned nonzero status 127
Code: Select all
#!/bin/bash
/usr/bin/fetchmail -a -s -m "/usr/bin/procmail -d
%T"
