dyndns adsl port forward

2010-06-27 Thread Basanta shrestha
Dear All,

CentOS 5.2

Followed http://wiki.centos.org/HowTos/postfix and installed
postfix dovecot system-switch-mail system-switch-mail-gnome

Local delivery and local receipt works ok. Couldn't send email to
external mail using 127.0.0.1 as smtp server.

Now trying to make my computer a full fledged mail server. I am behind ADSL NAT

got a dyndns address lal.homelinux.org.
In adsl router, configured the above address, port forward tcp port
110  to 192.168.0.x ( x being ip address of my computer)
can resolve lal.homelinux.org to ADSL WAN IP address.

hostname of the computer set to lal.homelinux.org

/etc/postfix/main.cf

myhostname = lal.homelinux.org
mydomain = homelinux.org
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/24, 127.0.0.0/8
relay_domains =
home_mailbox = Maildir/


nmaping lal.homelinux.org

22/tcp  open  ssh
25/tcp  open  smtp
110/tcp open  pop3
111/tcp open  rpcbind
143/tcp open  imap
735/tcp open  unknown
993/tcp open  imaps
995/tcp open  pop3s

Can't get to send mail outside the system nor receive from external
mail like gmail.com using smtp/pop3 as lal.homelinux.org

Please help.

Regards,
Basanta


Re: dyndns adsl port forward

2010-06-27 Thread Stan Hoeppner
Basanta shrestha put forth on 6/27/2010 3:53 AM:
 Dear All,
 
 CentOS 5.2
 
 Followed http://wiki.centos.org/HowTos/postfix and installed
 postfix dovecot system-switch-mail system-switch-mail-gnome
 
 Local delivery and local receipt works ok. Couldn't send email to
 external mail using 127.0.0.1 as smtp server.
 
 Now trying to make my computer a full fledged mail server. I am behind ADSL 
 NAT

This should get your outbound working:
http://www.hardwarefreak.com/postfix-adsl-relay-config.txt

You may have to install libsasl if it's not already installed.


This is why inbound mail to your domain isn't going to your server:

homelinux.org.  86400   IN  MX  20 mx2.mailhop.org.
homelinux.org.  86400   IN  MX  10 mx1.mailhop.org.

You don't own or control the domain homelinux.org.  Ownership/control is
required to route mail for a given domain to an MX.  The only way to get
_your_ mail for your _subdomain_ lal.homelinux.org to your Postfix server
lal.homelinux.org is to setup an arrangement with homelinux.org (a.k.a.
dyndns.org) to forward your mail to your server.  This is where free dynamic
dns services make the money that keeps them in business:  add-on services:
http://www.dyndns.com/services/mailhop/relay.html

$49.95/yr USD for their mail forwarding service that does what you need, but
with their domain name, not yours.

Pay someone like TZO ~$60 USD/yr for top notch dynamic DNS service, and pay a
registrar between $5-$15/yr for a domain name of _your_ choosing, and this all
becomes a whole lot more direct, and a lot easier for you to control and
configure.  That's about 20 cents per day combined cost--less than a cup of
coffee per day.  Is running your own mail server behind an adsl consumer
connection worth 201 cents a day to you?  If so, this is by far the best way
to do it.

It's how I've been doing it with TZO since 2005, though I've had static IP
service for over a year.  I stick with TZO just in case I move and can't get
static IP service.  I've had zero problems with TZO in 5 years, 100% uptime
AFAICT.  http://www.tzo.com

Many routers fully support TZO just as they do DynDNS.org:
http://www.tzo.com/MainPageSupport/TZO_Included.htm

-- 
Stan


Replace Private IP by Server Hostname in mail header

2010-06-27 Thread Rachid Abdelkhalak


Hello List,

I have a mail relay and an internal mail server both under Postfix and 
behind a firewall (DMZ and LAN), on both segment i'm using a private IP 
address with NAT.


On all outgoing emails headers sent by our users, i can see my servers ip 
addresses (private).


Is there any config that i can do to make postfix write hostname instead 
of the ip address on the header or replace the private ip address by the 
public ip address?


Thank you

Brest regards.


Re: Replace Private IP by Server Hostname in mail header

2010-06-27 Thread Jeroen Geilman

On 06/27/2010 01:20 PM, Rachid Abdelkhalak wrote:


Hello List,

I have a mail relay and an internal mail server both under Postfix and 
behind a firewall (DMZ and LAN), on both segment i'm using a private 
IP address with NAT.


On all outgoing emails headers sent by our users, i can see my servers 
ip addresses (private).


Is there any config that i can do to make postfix write hostname 
instead of the ip address on the header or replace the private ip 
address by the public ip address?


Thank you

Brest regards.


The format and content of Received: headers is described in detail in 
the relevant RFCs.


Make sure you know why you want to mess with them before blundering forward.

J.



Re: problem with sendmail -XV - VERP expansion

2010-06-27 Thread Wietse Venema
I checked out a few details, and the result is that turning on
VERP, before sending to a mailing list alias, does not turn on VERP
when delivering to the members of that mailing list (except in a
very special case that involves only local recipients). 

It can (and should) be made to work outside that special case, but
that requires a few changes to Postfix internals, and that will
take more time than I have available now.

There is a workaround to turn on VERP after the mailing list.  For
example, deliver mail to the mailing list alias with one Postfix
instance, then deliver mail to the members of that list with a
second Postfix instance that turns on VERP via one of the methods
in message 20100626210934.27b7e1f3...@spike.porcupine.org (this
involves content filters, or the Postfix 2.7 smtpd_command_filter
feature).

Wietse


Re: problem with sendmail -XV - VERP expansion

2010-06-27 Thread Keld Simonsen
On Sun, Jun 27, 2010 at 11:33:02AM -0400, Wietse Venema wrote:
 I checked out a few details, and the result is that turning on
 VERP, before sending to a mailing list alias, does not turn on VERP
 when delivering to the members of that mailing list (except in a
 very special case that involves only local recipients). 
 
 It can (and should) be made to work outside that special case, but
 that requires a few changes to Postfix internals, and that will
 take more time than I have available now.
 
 There is a workaround to turn on VERP after the mailing list.  For
 example, deliver mail to the mailing list alias with one Postfix
 instance, then deliver mail to the members of that list with a
 second Postfix instance that turns on VERP via one of the methods
 in message 20100626210934.27b7e1f3...@spike.porcupine.org (this
 involves content filters, or the Postfix 2.7 smtpd_command_filter
 feature).

Thanks for checking this out and finding the error, and
also thanks for giving hints for workarounds. I was quite puzzled
that I could not make it work.

best regards
keld


SQLITE_README.html (and related) issues

2010-06-27 Thread /dev/rob0
1. A minor bug, the hyperlink for sqlite: pointed to 
mysql_table.5.html:

--- postfix-2.8-20100618/html/BAD-SQLITE_README.html2010-06-18 
13:15:23.0 -
+++ postfix-2.8-20100618/html/SQLITE_README.html2010-06-27 
15:52:16.992251367 -
@@ -54,7 +54,7 @@
 
 blockquote
 pre
-a href=postconf.5.html#alias_mapsalias_maps/a = a 
href=mysql_table.5.htmlsqlite/a:/etc/postfix/sqlite-aliases.cf
+a href=postconf.5.html#alias_mapsalias_maps/a = a 
href=sqlite_table.5.htmlsqlite/a:/etc/postfix/sqlite-aliases.cf
 /pre
 /blockquote

2. SQLITE_README does not mention version 2.8 availability. 
sqlite_table(5) does. I think the README should, too.

3. sqlite_table(5) mentions the deprecated query syntax. I guess 
that's loaded from shared code with older SQL map types? Seems to me 
that there's no need to support that in sqlite_table, unless of 
course it's more work to NOT support it.

4. This has happened to me before, and I think I even brought it up 
here: make upgrade goes through my $html_directory, but I don't get 
the new goodies I was after.

This time I noticed on two systems that I did not get the sqlite 
documents upon upgrade from earlier (February 13) snapshots. On 
further inspection I saw that index.html was not updated, and 
SOHO_README.html was also missing.

Disclosure: one of these was make upgrade'ed lots of times since 
2.5.1 in '08. (The other was originally a 2.7 snapshot.)

Also: it seems that SQLITE_README made it to $readme_directory, and 
man5/sqlite_table.5 is there, but SOHO_README is not.

Do I need to use something like rsync in addition to make upgrade?
-- 
Offlist mail to this address is discarded unless
/dev/rob0 or not-spam is in Subject: header


Re: SQLITE_README.html (and related) issues

2010-06-27 Thread Wietse Venema
/dev/rob0:
 1. A minor bug, the hyperlink for sqlite: pointed to 
 mysql_table.5.html:
 
 --- postfix-2.8-20100618/html/BAD-SQLITE_README.html  2010-06-18 
 13:15:23.0 -
 +++ postfix-2.8-20100618/html/SQLITE_README.html  2010-06-27 
 15:52:16.992251367 -
 @@ -54,7 +54,7 @@
  
  blockquote
  pre
 -a href=postconf.5.html#alias_mapsalias_maps/a = a 
 href=mysql_table.5.htmlsqlite/a:/etc/postfix/sqlite-aliases.cf
 +a href=postconf.5.html#alias_mapsalias_maps/a = a 
 href=sqlite_table.5.htmlsqlite/a:/etc/postfix/sqlite-aliases.cf
  /pre
  /blockquote

There was a cut-and-paste error in the postlink script that replaces
string by hyperlinked words, so there were more instances of this.

 2. SQLITE_README does not mention version 2.8 availability. 
 sqlite_table(5) does. I think the README should, too.

Maybe when it is time for the stable release. It was painful enough
to modify all the claims that postscreen is part of Postfix 2.7.

 3. sqlite_table(5) mentions the deprecated query syntax. I guess 
 that's loaded from shared code with older SQL map types? Seems to me 
 that there's no need to support that in sqlite_table, unless of 
 course it's more work to NOT support it.

The idea is to make things easier for everyone by keeping instructions
identical.

 4. This has happened to me before, and I think I even brought it up 
 here: make upgrade goes through my $html_directory, but I don't get 
 the new goodies I was after.

Here, make upgrade installs mysql_table.5, mysql_table.5.html
and SQLITE_README.html.  I don't install ASCII README files but
they are configured similarly (in the postfix-files file) so I
expect similar results.

 further inspection I saw that index.html was not updated, and 
 SOHO_README.html was also missing.

The SOHO_README files were never installed.  Perhaps this is because
they contain duplicate information from other files. Note that
SOHO_README is also not referenced by index.html.

 Do I need to use something like rsync in addition to make upgrade?

No. Postfix build/install attempts to minimize dependencies on
other tools.

Wietse


Re: SQLITE_README.html (and related) issues

2010-06-27 Thread Wietse Venema
Wietse Venema:
  further inspection I saw that index.html was not updated, and 
  SOHO_README.html was also missing.
 
 The SOHO_README files were never installed.  Perhaps this is because
 they contain duplicate information from other files. Note that
 SOHO_README is also not referenced by index.html.

Actually it is referenced, so that is a dangling link. It's fixed now.

Wietse


Re: performance tuning - relay

2010-06-27 Thread Christian Purnomo


Subject: Re: performance tuning - relay
Date: Fri, Jun 25, 2010 at 06:21:01PM -0500
Quoting Stan Hoeppner (s...@hardwarefreak.com):

: Can you provide some more specs on server2?  IIRC you said you had a multidisk
: RAID array on serv2.  What RAID level and how many disks?  What filesystem?
: Are you running Courier with maildrop or the standalone maildrop with another
: IMAP server?  What filtering, if any, are you doing with maildrop?  Using mbox
: or maildir storage?  IIRC you previously said you're BCC'ing _everything_ into
: a single mailbox (single address) on server2.  Is this correct?
: 
: And, lastly, was server2 in production for any amount of time before these
: problems occurred, prompting your post, or is this a new server that you just
: brought online?
: 
: -- 
: Stan
: 
: 

Hi Stan,

All valid questions...

The real issue AFAIK was Server1 not feeding enough emails to Server2
and hence thousands of emails were queued on Server1 waiting to be
delivered to Server 2 via transport-relay.  This was the major issue I
was trying to solve.

From your questions above, I could see where you're coming from that if
Server2 has performance problem then it would make sense to see the
queue built up at Server1.  I can confirm server2 is very underload at
any time, the server is overspec'ed for what it is intended to do.  I
can also confirm while those thousands of emails queued up at Server1,
Server2 was running smooth with  0.1-0.3 load average.  

We have had server2 for about 4 years now and we have been having this
issues in the last 1 year where one of our new server happens to be a
mailling list which sends out thousands of emails to subscribers.

Anyway, Server2 spec is HP DL385G4, 4G RAM, 6 SCSI disks RAID 5 and
reiserfs.  

The delivery method on Server2 is maildrop - we use some mailfilter rule
to drop certain emails to certain folders.  I can understand this is
adding some overhead for the local delivery on Server2 but this is the
cost I'm happy to take on.  The queue can build up on Server2 and clear
up overtime without impacting our primary MX (Server1).

CP


Re: dyndns adsl port forward

2010-06-27 Thread Basanta shrestha
Dear Stan,
I doubt it is absolutely necessary to pay for that service.
Please refer

http://www.linuxforums.org/forum/servers/6797-email-server-setup.html

Regards,
Basanta


On Sun, Jun 27, 2010 at 3:35 PM, Stan Hoeppner s...@hardwarefreak.com wrote:
 Basanta shrestha put forth on 6/27/2010 3:53 AM:
 Dear All,

 CentOS 5.2

 Followed http://wiki.centos.org/HowTos/postfix and installed
 postfix dovecot system-switch-mail system-switch-mail-gnome

 Local delivery and local receipt works ok. Couldn't send email to
 external mail using 127.0.0.1 as smtp server.

 Now trying to make my computer a full fledged mail server. I am behind ADSL 
 NAT

 This should get your outbound working:
 http://www.hardwarefreak.com/postfix-adsl-relay-config.txt

 You may have to install libsasl if it's not already installed.


 This is why inbound mail to your domain isn't going to your server:

 homelinux.org.          86400   IN      MX      20 mx2.mailhop.org.
 homelinux.org.          86400   IN      MX      10 mx1.mailhop.org.

 You don't own or control the domain homelinux.org.  Ownership/control is
 required to route mail for a given domain to an MX.  The only way to get
 _your_ mail for your _subdomain_ lal.homelinux.org to your Postfix server
 lal.homelinux.org is to setup an arrangement with homelinux.org (a.k.a.
 dyndns.org) to forward your mail to your server.  This is where free dynamic
 dns services make the money that keeps them in business:  add-on services:
 http://www.dyndns.com/services/mailhop/relay.html

 $49.95/yr USD for their mail forwarding service that does what you need, but
 with their domain name, not yours.

 Pay someone like TZO ~$60 USD/yr for top notch dynamic DNS service, and pay a
 registrar between $5-$15/yr for a domain name of _your_ choosing, and this all
 becomes a whole lot more direct, and a lot easier for you to control and
 configure.  That's about 20 cents per day combined cost--less than a cup of
 coffee per day.  Is running your own mail server behind an adsl consumer
 connection worth 201 cents a day to you?  If so, this is by far the best way
 to do it.

 It's how I've been doing it with TZO since 2005, though I've had static IP
 service for over a year.  I stick with TZO just in case I move and can't get
 static IP service.  I've had zero problems with TZO in 5 years, 100% uptime
 AFAICT.  http://www.tzo.com

 Many routers fully support TZO just as they do DynDNS.org:
 http://www.tzo.com/MainPageSupport/TZO_Included.htm

 --
 Stan



Priority Management in postfix

2010-06-27 Thread Avinash Pawar // Viva
Hi,

I want to give priority to each outbound email and as per priority email
will be sent.

For example, if there are three email with priority *high*, *medium* and *
low*  respectively.
In this case, the high priority email should be sent first, then medium
priority email should be sent then low priority email should be sent.

Please suggest me whether this is possible or not in postfix. If possible
then please let me know how we can implement this?

-- 
Incase of any further queries, Please feel free to mail me or contact me on
the numbers provided below.

Thanks  Regards,
Avinash Pawar
Software Engineer.

Viva Infomedia Pvt. Ltd.
242, Oshiwara Industrial Centre,
New Link Road, Opp. Oshiwara Bus Depot,
Goregaon West, Mumbai 400104.
Direct: +91.22.40310356
Board: +91.22.40310310

Viva Infomedia: Awarded as Best SME (E-Commerce) at CNBC Emerging India
Awards 2009