Wednesday, May 11, 2016

Setting up the Postfix SMTP server to route all your email to an external SMTP Gateway

Standard
Suppose you want all your web servers to locally send all email (maybe from your contact forms, or whatever) to a real smtp gateway. If you're running postfix as your MTA, this is quite easy to achieve.
In your main.cf file (usually /etc/postfix/main.cf or /usr/local/etc/postfix/main.cf), specify your transport maps:

transport_maps = hash:/etc/postfix/transport


And in your transport file (usually /etc/postfix/transport or /usr/local/etc/postfix/transport), specify your gateways per domain.
This allows you to specify with regular expressions which emails go where. In this case, an asterisk specifies every domain (the transport file allows very complex setups, this is of course an extreme and trivial example):

* smtp:myotherhost.com

Then invoke postmap to regenerate the transports db, and reload postfix: 

postmap hash:/etc/postfix/transport
postfix reload

 source : http://marcelog.github.io/articles/configure_postfix_forward_all_email_smtp_gateway.html

Friday, March 11, 2016

How to Delete mailman archives from cPanel backend

Standard

Go to “/usr/local/cpanel/3rdparty/mailman/archives/private”
#cd /usr/local/cpanel/3rdparty/mailman/archives/private
You can see lots of directories in this path.
For example, If your mailing list account name is example@workonlinux.wordpress.com
then the directory name will be
example_workonlinux.wordpress.com
#cd example_workonlinux.wordpress.com
In this directory, you can see many files like
2012-January.txt.gz(year-month.txt.gz)
2012-January/(year-month)
attachments/
You can remove these files and directories.
#rm -rf file/directory name
Also one more thing, SOmetimes it will show the previous file size when you try to access it from cPanel front end. It may be due to cache. It would take around one hour to show the correct mailing list size after deletion.