View previous topic :: View next topic |
Author |
Message |
carpman Advocate

Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Thu Dec 14, 2006 1:19 pm Post subject: |
|
|
erik258 wrote: | Quote: | (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]: Connection refused) |
now why would that be? Are you running smtp of some kind on localhost? Are you running a firewall of some kind? Do you have a 'lo' network device? |
Not that i know of?
I have followed the guide and sent a test mail which was retrieved via fetchmail, it was in que for while then bounced back to me.
The box is on my local network which is behind a firewall but there is no firewall on the box?
I decided to start with simple and then increase functions so have commented out the line:
Code: |
/etc/postfix/main.cf
## AV
#content_filter = smtp-amavis:[127.0.0.1]:10024
|
No i can recieve mail ok but is insists on putting it in .maildir and not Maildir in /home/user !
I grep all files in /etc with .maildir and changed them but still puts them in .maildir?
there is also .procmailrc in user dir which is set to Maildir
any ideas? _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
 |
ivanova Apprentice


Joined: 12 Apr 2004 Posts: 158 Location: South Africa
|
Posted: Fri Jan 05, 2007 9:32 am Post subject: |
|
|
everything was working fine, but I updated courier-imap and now I keep getting timeouts when trying to use thunderbird. _________________ Ladies and Gentlemen... we are floating in space. |
|
Back to top |
|
 |
erik258 Advocate


Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Fri Jan 05, 2007 11:08 pm Post subject: |
|
|
carpman,
isn't .maildir a better place for mail? I think so, personally. Of course, to each his own. An easy solution is ln -s ~/.maildir ~/Maildir, effectively making them the same place.
ivanova,
Quote: | I keep getting timeouts when trying to use thunderbird. |
Doesn't the howto talk about thunderbird specifically? I never got it working, and much prefer sylpheed-claws as its memory footprint is minimal, and I like that about it. _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
 |
ivanova Apprentice


Joined: 12 Apr 2004 Posts: 158 Location: South Africa
|
Posted: Mon Jan 08, 2007 6:03 pm Post subject: |
|
|
Thunderbird works, I used it for a while now without problems. But something is broken now. I can view messages, but when I try to delete them I get an error:
Code: | COPY Failed - no write permission or out of disk space. |
Disk space is ok and I tried all sorts of permissions on my maildir (although it worked fine before).
I have problems with sylpheed too, so I think the problem lies with courier-imap or courier-authlib _________________ Ladies and Gentlemen... we are floating in space. |
|
Back to top |
|
 |
ivanova Apprentice


Joined: 12 Apr 2004 Posts: 158 Location: South Africa
|
Posted: Tue Jan 09, 2007 10:09 am Post subject: |
|
|
Solved my problems. First I had problems with authentication. Solved it by editing /etc/courier/authlib/authdaemonrc from:
Code: | authmodulelist="authldap authpam authshadow" |
to
Code: | authmodulelist="authpam authshadow authldap" |
Finally, there was a problem with the Trash folder which cause the errors above. Solved it by removing the folder in .maildir and Thunderbird. _________________ Ladies and Gentlemen... we are floating in space. |
|
Back to top |
|
 |
figueroa Advocate


Joined: 14 Aug 2005 Posts: 3008 Location: Edge of marsh USA
|
Posted: Sun Jan 14, 2007 10:50 pm Post subject: Calling clamav with procmail |
|
|
I have a well running mailserver installation that filters mail through spamassassin (calling spamc from procmail) but wanted to call clamav from procmail as well before submitting mail to spamassassin. What I came up with is posted at: https://forums.gentoo.org/viewtopic-p-3842834.html#3842834 _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
 |
imanassypov Tux's lil' helper

Joined: 08 Dec 2005 Posts: 118 Location: Toronto, Canada
|
Posted: Wed Jan 17, 2007 9:15 pm Post subject: forwarding spam to a different MTA? |
|
|
Hi all,
does anyone know how to forward the identified spam mail to a different MTA?
I know there are options to file it locally, send it to a specific ip address etc...
Thanks!
-ig _________________ I.M. |
|
Back to top |
|
 |
moesasji Apprentice

Joined: 10 May 2005 Posts: 263
|
Posted: Tue Feb 13, 2007 6:04 pm Post subject: |
|
|
First of all: Thanks for the great howto.
Based on this I have an IMAP server running without major hickups so far.
It was a big puzzle however.....
However I stumbled on one question that I can't find a solution for.
If I look at my log-files for the mail I see the following output
Code: |
Feb 13 17:51:07 [imapd-ssl] couriertls: /var/lib/courier-imap/couriersslcache: No such file or directory
Feb 13 17:51:07 [imapd-ssl] Connection, ip=[127.0.0.1]
Feb 13 17:51:07 [imapd-ssl] LOGIN, user=hge, ip=[127.0.0.1], protocol=IMAP
Feb 13 17:51:10 [imapd-ssl] LOGOUT, user=hge, ip=[127.0.0.1], headers=218092, body=0, time=3, starttls=1
Feb 13 17:53:33 [imapd-ssl] couriertls: /var/lib/courier-imap/couriersslcache: No such file or directory
Feb 13 17:53:33 [imapd-ssl] Connection, ip=[127.0.0.1]
Feb 13 17:53:33 [imapd-ssl] LOGIN, user=hge, ip=[127.0.0.1], protocol=IMAP
Feb 13 17:53:33 [imapd-ssl] LOGOUT, user=hge, ip=[127.0.0.1], headers=0, body=0, time=0, starttls=1
|
As you can see it contains lines that say couriersslcache: no such file or directory
These errors are generated by Squirrelmail....but for some reason I can't get rid of them and google doesn't give an answer.
If I look through the config-files this couriersslcache is defined in the file /etc/courier-imap/imapd-ssl.
However if I understand it correctly from the comments in that file this cache should be created automatically.
Clearly it is not.... as there is no file named couriersslcache on my system.
Does anybody now how to get rid of this error-message?? (Or am I making a stupid mistake here?) |
|
Back to top |
|
 |
benkong2 n00b


Joined: 18 Jul 2004 Posts: 7
|
Posted: Tue Feb 20, 2007 9:56 pm Post subject: Cannot connect to mail server |
|
|
Well it should work however my kmail gets a connection refused error. I can however telnet 10.0.0.1 25 and get the proper response. What should I check?
Great tutorial |
|
Back to top |
|
 |
Bigun Advocate


Joined: 21 Sep 2003 Posts: 2198
|
Posted: Fri Mar 02, 2007 1:05 am Post subject: |
|
|
I'm having issues receiving mail:
Code: | Mar 1 18:57:15 cybergrunge postfix/smtpd[22042]: NOQUEUE: reject: RCPT from nn6.excitenetwork.com[207.159.120.60]: 554 5.7.1
<nn6.excitenetwork.com[207.159.120.60]>: Client host rejected: Access denied; from=<-deleted-@excite.com> to=<-deleted-@cybergrunge.com> proto=ESMTP helo=<excite.com> |
My main.cf _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
 |
Mr.C. n00b

Joined: 25 Feb 2007 Posts: 35
|
Posted: Fri Mar 02, 2007 1:48 am Post subject: |
|
|
bigun89 wrote: | I'm having issues receiving mail:
Code: | Mar 1 18:57:15 cybergrunge postfix/smtpd[22042]: NOQUEUE: reject: RCPT from nn6.excitenetwork.com[207.159.120.60]: 554 5.7.1
<nn6.excitenetwork.com[207.159.120.60]>: Client host rejected: Access denied; from=<-deleted-@excite.com> to=<-deleted-@cybergrunge.com> proto=ESMTP helo=<excite.com> |
My main.cf |
What IP(s) do you think $mynetworks is ?
Are you behind a NAT'd firewall?
Also, while you are debugging, set:
unknown_local_recipient_reject_code = 450
instead of 550, so that bounces will retry until you get your config worked out.
Its better to post output of postconf -n rather than your entire file - too much to look through. |
|
Back to top |
|
 |
Bigun Advocate


Joined: 21 Sep 2003 Posts: 2198
|
Posted: Fri Mar 02, 2007 3:50 am Post subject: |
|
|
Sorry, here it is:
Code: | broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
home_mailbox = .maildir/
html_directory = /usr/share/doc/postfix-2.3.6/html
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = cybergrunge.com
myhostname = cybergrunge.com
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.6/readme
relay_domains = $mydestination
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_client_restrictions = permit_sasl_authenticated, reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 450
|
I'm not firewalled. I have a full and open connection.
I'm not sure what you mean by $mynetworks.... I have nothing set for it in main.cf.
Also noticed these:
Code: | Mar 1 18:57:14 cybergrunge postfix/smtpd[22042]: sql_select option missing
Mar 1 18:57:14 cybergrunge postfix/smtpd[22042]: auxpropfunc error no mechanism available
Mar 1 18:57:14 cybergrunge postfix/smtpd[22042]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
Mar 1 18:57:14 cybergrunge postfix/smtpd[22042]: auxpropfunc error invalid parameter supplied
Mar 1 18:57:14 cybergrunge postfix/smtpd[22042]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: ldapdb
Mar 1 18:57:15 cybergrunge postfix/smtpd[22042]: connect from nn6.excitenetwork.com[207.159.120.60]
Mar 1 18:57:15 cybergrunge postfix/smtpd[22042]: NOQUEUE: reject: RCPT from nn6.excitenetwork.com[207.159.120.60]: 554 5.7.1 <nn6.excitenetwork.com[207.159.120.60]>: Client host rejected: Access denied; from=<-deleted-@excite.com> to=<-deleted-@cybergrunge.com> proto=ESMTP helo=<excite.com>
Mar 1 18:57:15 cybergrunge postfix/smtpd[22042]: disconnect from nn6.excitenetwork.com[207.159.120.60]
Mar 1 19:00:35 cybergrunge postfix/anvil[22044]: statistics: max connection rate 1/60s for (smtp:207.159.120.60) at Mar 1 18:57:15
Mar 1 19:00:35 cybergrunge postfix/anvil[22044]: statistics: max connection count 1 for (smtp:207.159.120.60) at Mar 1 18:57:15
Mar 1 19:00:35 cybergrunge postfix/anvil[22044]: statistics: max cache size 1 at Mar 1 18:57:15
|
_________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
 |
Mr.C. n00b

Joined: 25 Feb 2007 Posts: 35
|
Posted: Fri Mar 02, 2007 4:22 am Post subject: |
|
|
bugun89,
smtpd_client_restrictions = permit_sasl_authenticated, reject
The default is to allow all connections requests.
You are only allowing SASL-authenticated *clients* to connect and relay mail to your system. That means I cannot send you email, unless I authenticate myself with your system.
# telnet cybergrunge.com 25
Trying 69.18.117.210...
Connected to cybergrunge.com.
Escape character is '^]'.
220 cybergrunge.com ESMTP Postfix
EHLO gomer.com
250-cybergrunge.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM:<test@example.com>
250 2.1.0 Ok
RCPT TO:<root@cybergrunge.com>
554 5.7.1 <example.com[10.0.0.1]>: Client host rejected: Access denied
RCPT TO:<root>
554 5.7.1 <example.com[10.0.0.1]>: Client host rejected: Access denied
quit
221 2.0.0 Bye
Connection closed by foreign host.
You have a number of other SASL problems (sql_select error, auxpropfunc no mechanism, failure to load the sql plugin for sasl, etc.)
It is generally advised to learn to configure postfix w/out authentication first, and then setup TLS and SASL after you have a working installation.
Get a firewall. |
|
Back to top |
|
 |
Bigun Advocate


Joined: 21 Sep 2003 Posts: 2198
|
Posted: Fri Mar 02, 2007 2:03 pm Post subject: |
|
|
Ok, that is fixed... thank you.
Now I'm having issues sending mail without using squirrelmail (ie - sending something from localhost).
Code: | Mar 2 08:31:46 cybergrunge postfix/smtpd[24406]: connect from uslec-***-***-***-***.cust.uslec.net[***.***.***.***]
Mar 2 08:31:46 cybergrunge postfix/smtpd[24406]: NOQUEUE: reject: RCPT from uslec-***.***.***.***.cust.uslec.net[***.***.***.***]: 554 5.7.1 <-deleted-@-deleted-.com>: Relay access denied; from=<-deleted-@cybergrunge.com> to=<-deleted-@-deleted-.com> proto=ESMTP helo=<[192.168.3.100]>
Mar 2 08:31:48 cybergrunge postfix/smtpd[24406]: lost connection after RCPT from uslec-***.***.***.***.cust.uslec.net[***.***.***.***]
Mar 2 08:31:48 cybergrunge postfix/smtpd[24406]: disconnect from uslec-***.***.***.***.cust.uslec.net[***.***.***.***]
|
I did some research and I found that it probably has something to do with my relay_domains setting. Right now it is set to $mydestination (which seems default). And $mydestination is set to:
Code: | mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain |
Am I on the right track here? _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
 |
Mr.C. n00b

Joined: 25 Feb 2007 Posts: 35
|
Posted: Fri Mar 02, 2007 5:42 pm Post subject: |
|
|
bigun89 wrote: | Ok, that is fixed... thank you.
Now I'm having issues sending mail without using squirrelmail (ie - sending something from localhost).
Code: | Mar 2 08:31:46 cybergrunge postfix/smtpd[24406]: connect from uslec-***-***-***-***.cust.uslec.net[***.***.***.***]
Mar 2 08:31:46 cybergrunge postfix/smtpd[24406]: NOQUEUE: reject: RCPT from uslec-***.***.***.***.cust.uslec.net[***.***.***.***]: 554 5.7.1 <-deleted-@-deleted-.com>: Relay access denied; from=<-deleted-@cybergrunge.com> to=<-deleted-@-deleted-.com> proto=ESMTP helo=<[192.168.3.100]>
Mar 2 08:31:48 cybergrunge postfix/smtpd[24406]: lost connection after RCPT from uslec-***.***.***.***.cust.uslec.net[***.***.***.***]
Mar 2 08:31:48 cybergrunge postfix/smtpd[24406]: disconnect from uslec-***.***.***.***.cust.uslec.net[***.***.***.***]
|
I did some research and I found that it probably has something to do with my relay_domains setting. Right now it is set to $mydestination (which seems default). And $mydestination is set to:
Code: | mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain |
Am I on the right track here? |
Postfix is now seeing your connection *as an outsider*, and those it will not relay mail for outsiders (nor to you want that). You can send email via squirrelmail because it connects locally (via the loopback interface (i.e. 127.0.0.1, localhost). You will also find it succeeds using a simple SMTP conversations, via telnet localhost 25, as I showed earlier.
I see that your HELO is IP addres 192.168.3.100. But cybergrunge.com has a different IP (a route-able, not private IP). So, as I asked earlier, what IP do you think postfix is considering as its own? What IPs are you connecting from when it fails? I'd guess from the data above and what you said earlier, your server is directly connected with your public IP. Postfix will accept email for all hosts on that subnet (mynetworks_style=subnet). That probably is NOT what you want (open relay for all others on the subnet). And your system from where you are trying to send email to your server are on a private 192.168.3.0/24 net. Postfix will consider this a foreign address, and will not relay email from foreign address.
You need to get clear in your mind your network topology. It would be more helpful if described this (you said no firewall or NATing, but something doesn't fit).
MrC |
|
Back to top |
|
 |
Bigun Advocate


Joined: 21 Sep 2003 Posts: 2198
|
Posted: Fri Mar 02, 2007 6:49 pm Post subject: |
|
|
The only actual NAT'ing is on the client side. My machine is going through a router. Most homes and businesses go through one, mine being no exception. However, the actual mail server is sitting in a rack in a ISP.
I have SMTP authentication turned on anyway, can I just tell postfix to accept everyone? _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
 |
Mr.C. n00b

Joined: 25 Feb 2007 Posts: 35
|
Posted: Fri Mar 02, 2007 7:01 pm Post subject: |
|
|
bigun89 wrote: | The only actual NAT'ing is on the client side. My machine is going through a router. Most homes and businesses go through one, mine being no exception. However, the actual mail server is sitting in a rack in a ISP.
I have SMTP authentication turned on, anyway I can just tell postfix to accept everyone? |
Don't make assumptions about what other peoples networks. Most homes do not use routers, they use "network appliances" which offer a variety of functions including routing, firewall, NAT, PAT, DHCP, etc.
I specifically asked if you were NATd in my first response. You declined to state, and implied "no".
I specifically asked what you thought your $mynetworks value is. You declined to determine this and state.
I specifically asked you to describe what *you* believe postfix thinks its IP address is, and what your sending IP address is.
I don't ask these questions because I'm curious - they are asked to get *you* to understand what's going on.
If you just want the answers to "how do I make it work", I'm not the one to help you. |
|
Back to top |
|
 |
Bigun Advocate


Joined: 21 Sep 2003 Posts: 2198
|
Posted: Fri Mar 02, 2007 8:02 pm Post subject: |
|
|
Mr.C. wrote: | I specifically asked if you were NATd in my first response. You declined to state, and implied "no". |
I would assume since the machine in question is the server, I didn't think you were asking about my machine.
Mr.C. wrote: | I specifically asked what you thought your $mynetworks value is. You declined to determine this and state. |
Maybe because I didn't know?
Mr.C. wrote: | I specifically asked you to describe what *you* believe postfix thinks its IP address is, and what your sending IP address is.
I don't ask these questions because I'm curious - they are asked to get *you* to understand what's going on.
If you just want the answers to "how do I make it work", I'm not the one to help you. |
Asking me questions will not help me understand what is going on. Not everyone learns the same way. I myself learn by getting something to work first, then tinkering from that point forward.
I'm not sure if this was your intention, but I felt "talked down" to by your reply, and do not wish for that kind of help. Maybe it would be best to leave this as is. _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
 |
carpman Advocate

Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Wed Mar 14, 2007 7:31 pm Post subject: |
|
|
Hello, ok have it working i think, i have set it up TLS in postfix but when trying to connect from clients using TLS it does not work, i can only do it if select ssl, if try the 'see what server supports' again i only get ssl and not TLS!
Is this correct?
cheers _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
 |
Mr.C. n00b

Joined: 25 Feb 2007 Posts: 35
|
Posted: Wed Mar 14, 2007 8:00 pm Post subject: |
|
|
You're going to have to give more details than that.
Some clients such as Outlook 2000 will only work via SSL port 465.
MrC |
|
Back to top |
|
 |
carpman Advocate

Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Wed Mar 14, 2007 8:12 pm Post subject: |
|
|
Mr.C. wrote: | You're going to have to give more details than that.
Some clients such as Outlook 2000 will only work via SSL port 465.
MrC |
The clients are KMail and Thunderbird, what other info do you require? _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
 |
Mr.C. n00b

Joined: 25 Feb 2007 Posts: 35
|
Posted: Wed Mar 14, 2007 9:23 pm Post subject: |
|
|
Well, have you verified that port 25 (or your submission port 587) is offering TLS ?
Have you verified that the TLS connection succeeds with "openssl s_client --starttls smtp ..." ?
MrC |
|
Back to top |
|
 |
carpman Advocate

Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Wed Mar 14, 2007 9:28 pm Post subject: |
|
|
Mr.C. wrote: | Well, have you verified that port 25 (or your submission port 587) is offering TLS ?
Have you verified that the TLS connection succeeds with "openssl s_client --starttls smtp ..." ?
MrC |
Umm no, but if i knew how i would? _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
 |
Mr.C. n00b

Joined: 25 Feb 2007 Posts: 35
|
|
Back to top |
|
 |
carpman Advocate

Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Wed Mar 14, 2007 9:59 pm Post subject: |
|
|
Cheers, will try that. _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
 |
|