Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th January 2007, 21:04
pier17 pier17 is offline
Junior Member
 
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default help?.. postfix- relaying problem to internal server !!

hi all,

I installed postfix by following the "Postfix Spam Filter using Ubuntu Dapper, MailScanner, SpamAssassin, Razor, Pyzor, DCC and ClamAV"

now, I am testing it but emails from outside just waiting in the incoming mail queue..is not relayed to internal exchange server...

mail log is like ;

Jan 19 13:48:24 smtp-gw postfix/cleanup[4282]: EFED68CBFE: hold: header Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247])??by smtp-gw.example.com (Postfix) with SMTP id EFED68CBFE??for <xx@zguide.com>; Fri, 19 Jan 2007 07:48:2 from an-out-0708.google.com[209.85.132.247]; from=<lala@gmail.com> to=<xx@zguide.com> proto=SMTP helo=<an-out-0708.google.com>

root@smtp-gw:/# postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
D8E3B8CBE1! 1581 Fri Jan 19 10:10:30 lala@gmail.com
xx@zguide.com

there are bunch of emails waiting in incoming queue directory..


1.my relay_recipients alreayd contains the user xx@zguide.com
2.my actual domain is example.com but I have other domain zguide.com that I am testing.
3. my main.cf is like ;
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
myorigin = example.com
myhostname = smtp-gw.example.com
mynetworks = 127.0.0.0/8, 192.168.1.0/24, 192.168.100.0/24
message_size_limit = 10485760
local_transport = error:No local mail delivery
mydestination = example.com
local_recipient_maps =
virtual_alias_maps = hash:/etc/postfix/virtual
relayhost = [exhangesrv.example.com]
relay_recipient_maps = hash:/etc/postfix/relay_recipients
transport_maps = hash:/etc/postfix/transport
relay_domains = hash:/etc/postfix/relay_domains
recipient_delimiter =
# Specify your NAT/proxy EXTERNAL address here.
proxy_interfaces = a.b.c.d
smtpd_helo_required = yes
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access, reject_non_fqdn_sender, reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, reject_unauth_pipelining
smtpd_data_restrictions = reject_unauth_pipelining
header_checks = pcre:/etc/postfix/header_checks
body_checks = pcre:/etc/postfix/body_checks


where did I make a mistake???

can you help me???

Last edited by pier17; 19th January 2007 at 21:07.
Reply With Quote
Sponsored Links
  #2  
Old 20th January 2007, 19:02
falko falko is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Are there any errors in your mail log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 23rd January 2007, 17:49
pier17 pier17 is offline
Junior Member
 
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there is no error in the mail log..when I tried to make telnet connection to exchange server
I got this;

root@smtp-gw:/# telnet 192.168.1.24 25
Trying 192.168.1.24...
Connected to 192.168.1.24.
Escape character is '^]'.
220 ************************************************** ************0****0****0 ***************2******200***0********0*00
Reply With Quote
  #4  
Old 23rd January 2007, 22:22
pier17 pier17 is offline
Junior Member
 
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

and also the only thing in my mail log is like..from boot..

Jan 23 15:12:52 smtp-gw dccifd[3197]: fopen(/var/run/dcc/dccifd.pid): No such file or directory
Jan 23 15:12:52 smtp-gw dccifd[3197]: 1.2.74 listening to /var/lib/dcc/dccifd
Jan 23 15:12:57 smtp-gw postfix/master[3262]: daemon started -- version 2.3.3, configuration /etc/postfix
Jan 23 15:13:00 smtp-gw MailScanner[3498]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Jan 23 15:13:00 smtp-gw MailScanner[3498]: Read 755 hostnames from the phishing whitelist
Jan 23 15:13:02 smtp-gw MailScanner[3498]: Using SpamAssassin results cache
Jan 23 15:13:02 smtp-gw MailScanner[3498]: Connected to SpamAssassin cache database
Jan 23 15:13:02 smtp-gw MailScanner[3498]: Enabling SpamAssassin auto-whitelist functionality...
Jan 23 15:13:08 smtp-gw MailScanner[3498]: ClamAV scanner using unrar command /usr/bin/unrar
Jan 23 15:13:08 smtp-gw MailScanner[3498]: Using locktype = flock
Jan 23 15:13:11 smtp-gw MailScanner[3528]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Jan 23 15:13:11 smtp-gw MailScanner[3528]: Read 755 hostnames from the phishing whitelist
Jan 23 15:13:12 smtp-gw MailScanner[3528]: Using SpamAssassin results cache
Jan 23 15:13:12 smtp-gw MailScanner[3528]: Connected to SpamAssassin cache database
Jan 23 15:13:12 smtp-gw MailScanner[3528]: Enabling SpamAssassin auto-whitelist functionality...
Jan 23 15:13:18 smtp-gw MailScanner[3528]: ClamAV scanner using unrar command /usr/bin/unrar
Jan 23 15:13:18 smtp-gw MailScanner[3528]: Using locktype = flock
Jan 23 15:13:22 smtp-gw MailScanner[3532]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Jan 23 15:13:22 smtp-gw MailScanner[3532]: Read 755 hostnames from the phishing whitelist
Jan 23 15:13:23 smtp-gw MailScanner[3532]: Using SpamAssassin results cache
Jan 23 15:13:23 smtp-gw MailScanner[3532]: Connected to SpamAssassin cache database
Jan 23 15:13:23 smtp-gw MailScanner[3532]: Enabling SpamAssassin auto-whitelist functionality...
Jan 23 15:13:33 smtp-gw MailScanner[3546]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Jan 23 15:13:33 smtp-gw MailScanner[3532]: ClamAV scanner using unrar command /usr/bin/unrar
Jan 23 15:13:33 smtp-gw MailScanner[3532]: Using locktype = flock
Jan 23 15:13:33 smtp-gw MailScanner[3546]: Read 755 hostnames from the phishing whitelist
Jan 23 15:13:34 smtp-gw MailScanner[3546]: Using SpamAssassin results cache
Jan 23 15:13:34 smtp-gw MailScanner[3546]: Connected to SpamAssassin cache database
Jan 23 15:13:34 smtp-gw MailScanner[3546]: Enabling SpamAssassin auto-whitelist functionality...
Jan 23 15:13:41 smtp-gw MailScanner[3546]: ClamAV scanner using unrar command /usr/bin/unrar
Jan 23 15:13:41 smtp-gw MailScanner[3546]: Using locktype = flock
Jan 23 15:13:44 smtp-gw MailScanner[3548]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Jan 23 15:13:44 smtp-gw MailScanner[3548]: Read 755 hostnames from the phishing whitelist
Jan 23 15:13:45 smtp-gw MailScanner[3548]: Using SpamAssassin results cache
Jan 23 15:13:45 smtp-gw MailScanner[3548]: Connected to SpamAssassin cache database
Jan 23 15:13:45 smtp-gw MailScanner[3548]: Enabling SpamAssassin auto-whitelist functionality...
Jan 23 15:13:52 smtp-gw MailScanner[3548]: ClamAV scanner using unrar command /usr/bin/unrar
Jan 23 15:13:52 smtp-gw MailScanner[3548]: Using locktype = flock
Jan 23 15:15:46 smtp-gw postfix/smtpd[3625]: connect from nf-out-0910.google.com[64.233.182.185]
Jan 23 15:15:46 smtp-gw postfix/smtpd[3625]: BFB6A8CC2F: client=nf-out-0910.google.com[64.233.182.185]
Jan 23 15:15:47 smtp-gw postfix/cleanup[3628]: BFB6A8CC2F: hold: header Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185])??by smtp-gw.warmlyyours.com (Postfix) with SMTP id BFB6A8CC2F??for <rguedes@abathroomguide.com>; Tue, 23 Jan 2007 09:15: from nf-out-0910.google.com[64.233.182.185]; from=<duygukanya@gmail.com> to=<rguedes@abathroomguide.com> proto=SMTP helo=<nf-out-0910.google.com>
Jan 23 15:15:47 smtp-gw postfix/cleanup[3628]: BFB6A8CC2F: message-id=<55ee311b0701231314t35f744c7nd36422c30f5473f6@m ail.gmail.com>


thx in advance!!
Reply With Quote
  #5  
Old 24th January 2007, 12:47
falko falko is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

I don't see any errors in your mail log.
What's in /etc/postfix/transport? Did you run
Code:
postmap /etc/postfix/transport
/etc/init.d/postfix restart
after modifying that file?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 24th January 2007, 16:20
pier17 pier17 is offline
Junior Member
 
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes I run it everytime I modify the transport, relay_recipients, and relay_domains...

in transport file;

# TRANSPORT(5)
abathroomguide.com smtp:[lancelot.warmlyyours.com]
warmlyyours.com smtp:[lancelot.warmlyyours.com]

#
# NAME
# transport - Postfix transport table format
#
.
.
.


only thing I changed is ..in /etc/MailScanner/mailscanner-mrtg.conf, it didnt accept "MailScanner Work Directory = /var/spool/MailScanner/incoming" ( it says Unable to find a mountpoint for /var/spool/MailScanner/incoming. Please set MailScanner Work Directory in mailscanner-mrtg.conf to a valid mountpoint. You can see a list of mointpoints on your system by using the df command
) so I chanced as a "MailScanner Work Directory = / "


also I dont use snmp because it was optional..

in the firewall do I need to make any more configuration other than opening smtp port?

Also in /opt/MailScanner/etc/MailScanner.conf;

Incoming Queue Dir = /var/spool/postfix/hold
Incoming Work Dir = /var/spool/MailScanner/incoming



but in /etc/MailScanner/mailscanner-mrtg.conf;

Incoming Queue Dir = /var/spool/postfix/hold/
MailScanner Work Directory = /

should I make work directories the same in both configuration???




thx in advance..

Last edited by pier17; 24th January 2007 at 17:50.
Reply With Quote
  #7  
Old 24th January 2007, 22:28
pier17 pier17 is offline
Junior Member
 
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey Falko,

actually I found the reason why it doesnt relay the emails..


from vi /etc/postfix/header_checks
I removed /^Received:/ HOLD

it relays now but this time I think it is not gonna scan it because it first hold it..scan..then sent it..

do you think my sender restrictions rules still apply?
Reply With Quote
  #8  
Old 27th January 2008, 00:49
RStin RStin is offline
Junior Member
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by pier17
hey Falko,

actually I found the reason why it doesnt relay the emails..


from vi /etc/postfix/header_checks
I removed /^Received:/ HOLD

it relays now but this time I think it is not gonna scan it because it first hold it..scan..then sent it..

do you think my sender restrictions rules still apply?
Well, I have the same problem (ubuntu 6.06 installation with postfix & mailscanner).
MailScanner runs and in /var/log/mail.info I have the same output (every 4-5 seconds same things) and NO mail delivered.

All my emails are still in /var/spool/postfix/hold .
As soon I stop header_checks (either removed HOLD from header_checks either comment it out in main.cf ) all mails are delivered just fine.

So, what is the problem with MailScanner and Postfix. I'm not a big fan of amavis and I wish to change it.
Reply With Quote
  #9  
Old 27th January 2008, 14:56
falko falko is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Any errors in your mail log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 27th January 2008, 15:00
RStin RStin is offline
Junior Member
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

No problems in logs.

I found the problem and fixed it (sort of). It was caused by mailscanner version and some incompatibility with postfix. I used the debug mode in mailscanner and then fixed the problem by using Postfix.pm from latest version of mailscanner.

Now the system works just fine.
Reply With Quote
The Following User Says Thank You to RStin For This Useful Post:
falko (28th January 2008)
Reply

Bookmarks

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
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
php Apps email not going through palkat General 8 21st September 2011 05:35
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 00:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.