zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Postfix with IPv6

September 3, 2010 by Igor Drobot Leave a Comment


In this how to I describe the basically configuration and administration of Postfix on Debian Lenny.
Current I’m using Postfix version 2.5.5
This tutorial should working with older and newer versions.

1
2
postconf -d | grep "mail_version =" | cut -d" " -f 3
2.5.5

postconf -d | grep "mail_version =" | cut -d" " -f 3 2.5.5

You can find the postfix main configuration file under “/etc/postfix”
Let see what wee need to configure a working Internet Mail-Server

1
postfix ~ # vim /etc/postfix/main.cf

postfix ~ # vim /etc/postfix/main.cf

My example configuration:

1
2
3
4
5
6
7
8
9
10
11
12
13
myhostname = ipv6.postfix.idrobot.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = ipv6.postfix.idrobot.net, localhost.localdomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
smtp_bind_address6 = 2a01:4f8:101:265::37
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
bounce_template_file = /etc/postfix/bounce.cf

myhostname = ipv6.postfix.idrobot.net alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = ipv6.postfix.idrobot.net, localhost.localdomain, localhost mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 smtp_bind_address6 = 2a01:4f8:101:265::37 mailbox_command = mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all home_mailbox = Maildir/ bounce_template_file = /etc/postfix/bounce.cf

If you want to relay your mails to another mail-server you can use the relayhost option:
Edit main.cf, and add this line:

1
relayhost = ipv6.mx.idrobot.net

relayhost = ipv6.mx.idrobot.net

Some administration commands:
Show running config:

1
postconf -n

postconf -n

Show the default postfix config instead of running one:

1
postconf -d

postconf -d

Show message content:

1
postcat -q 7FB942082

postcat -q 7FB942082

Delete all mail in queue:

1
postsuper -d ALL

postsuper -d ALL

Schedule immediate delivery:

1
postqueue -i 7FB942082

postqueue -i 7FB942082

Flush the queue:

1
postqueue -f

postqueue -f

Filed Under: Debian, IPv6, Linux, Mailing, Networking Tagged With: Ipv6, MTA, Postfix, Postfix ipv6

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok