Postfix Create Blackhole For Authenticated User’s Outgoing Submission
I don’t know what is the right subject for this topic, the idea is, i just want my outgoing smtp for sending email only, authenticated user not supposed send(or accidentally) to his/her smtp authentication account.which are in my configuration stored in virtual mailbox maps table. In normal case can delivering email to maildir.
I’m using postfixadmin to generate username/password, saslauthd with pam_mysql for querying username/password to mysql virtual mailbox table.Everything is okay with authentication things, except i don’t want username receiving email
In postfix access 5 manual there is actions called DISCARD
DISCARD optional text... Claim successful delivery and silently discard the message. Log the optional text if specified, oth- erwise log a generic message. Note: this action currently affects all recipients of the message. To discard only one recipient without discarding the entire message, use the transport(5) table to direct mail to the discard(8) service. This feature is available in Postfix 2.0 and later.
Installing Self Signed smtp/imapd/pop3 Certificate on K800i Sony Ericsson
I own this beautiful K800i phonecell about 3 years more or less. The great things is K800i’s email client support for smtp authentication, imap, pop3, ssl, tls, port customization. I will show you how to plant my self signed smtp server certificate into K800i
First of all we need to copy the certificate to have a .cer extension. The phone uses this as the clue that the file is a certificate and will ask if it is to be installed.
Self signed cert for ougoing SMTP
# cd /etc/postfix # cp cacert.pem smtp.cer # more smtp.pem -----BEGIN CERTIFICATE----- MIIDvzCCAyigAwIBAgIJAK6WD/vgjFZcMA0GCSqGSIb3DQEBBAUAMIGcMQswCQYD VQQGEwJJRDEUMBIGA1UECBMLREtJIEpha2FydGExEDAOBgNVBAcTB0pha2FydGEx ---- snip ---- ---- snip ---- ---- snip ---- jUSsVnNPHYewsKdKRfzoivMqQgI+IIzw5NXiE78lpmAsZOdMfkR4U+dpTr87mCmE wcBi07++mqLhDvYvcGw4ol1Yp7sX4NgMbTrZ6APpaI8l4Rx4jb2p7UXU0YGx7aPV idZr -----END CERTIFICATE-----
Install xtables-addons on fedora 12
i’m not gonna wasting time, here’s how to do it
Download xtables-addons
# wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/1.20/xtables-addons-1.20.tar.bz2?use_mirror=waix
install kernel-devel kernel-headers iptables-devel gcc
# yum -y install kernel-devel kernel-headers iptables-devel gcc
extract xtables-addons-1.20.tar.bz2
# tar xjf xtables-addons-1.20.tar.bz2
cd to xtables-addons-1.20 directory
# cd xtables-addons-1.20
My Daughter’s Masterpiece
Postfix Smtp Outgoing IP Rotator using iptables
This is the scheme
e.g:
I got 5 Public IPs. i’m Gonna configure them, so Postfix can use multiple interfaces/ips for outgoing smtp connections.
First we need creating Interface aliases for those 5 public IPs.
In my system, using fedora:
# cd /etc/sysconfig/network-scripts/ # cp ifcfg-eth0 ifcfg-eth0:1
Edit ifcfg-eth0:1
# vi ifcfg-eth0\:1 DEVICE=eth0 <-- default device HWADDR=XX:XX:XX:XX:XX:XX ONBOOT=yes TYPE=Ethernet BOOTPROTO=none IPADDR=202.XXX.XX.2 <-- default eth0 IP address PREFIX=24 GATEWAY=202.XXX.XX.1 DNS1=202.XXX.XX.XX
Change DEVICE and IPADDR parameters
Centos 5 Compile Postfix With Tcp Table Support
I've seen someone asking for postfix TCP_TABLE support on centos at mailing list.Actually that was easy to achieved.I'm gonna explain how to build postfix rpm package with TCP_TABLE support.There's great tutorial on how to build postfix RPM package maintain by Simon J Mudd.
I'm gonna used Simon J mud's postfix source RPM package to build the binary.
First download the latest postfix SRPM package
$ rpm -Uvh postfix-2.6.5-1.src.rpm $ cd `rpm --eval '%{_sourcedir}'` $ export POSTFIX_SMTPD_MULTILINE_GREETING=1 $ export POSTFIX_LDAP=1 $ export POSTFIX_MYSQL_REDHAT=1 $ export POSTFIX_PCRE=1 $ export POSTFIX_PGSQL=1 $ export POSTFIX_RBL_MAPS=1 $ export POSTFIX_SASL=2 $ export POSTFIX_TLS=1 $ export POSTFIX_VDA=1 $ export POSTFIX_DB=4
Zombie Process
A zombie, or defunct, process is a process that has terminated, but its parent process has not taken it out of the process table with the wait() family of system calls. This typically happens when a program forks/execs another program, but then doesn’t reap it properly. The easiest way to write the parent to properly reap its children is to setup a signal handler for SIGCHLD that calls wait().
See the man pages on your local system for signal and wait(2).
Zombie and defunct states of a process are different things. Zombie is created when a child dies and parent didn’t call wait. Defunct is created when parent dies before the child finishes.
Defunct processes can’t be killed since they are already dead. To make them disappear you have to kill their parent process…
It’s not possible to kill defunct processes.
A good way to kill lists of processes is:
$ ps axf | grep name-of-process | grep -v -grep | awk '{print "kill -9 ",$1}' | sh
Connect to office vpn using speedy + linksys DD-WRT
Sometimes, i need to access to my computers/servers at office Local Area Network from home. i used to dialed vpn connection from windows XP home.but here, i'll share how to automatically connect to vpn server via linksys dd-wrt pptp client.
- Connect to linksys/dd-wrt management via browser, point it to http://192.168.1.1 (default ip management)
- Login and go to Services -> PPTP tab -> PPTP Client section
- Adjust Server IP or DNS Name, Remote Subnet, Remote Subnet Mask User and Password according to your network configuration.