Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to use my postfix mail server from anywhere , so i need to apply relaying for 0.0.0.0..... but i want that only using my domain and my local user can only relaying with my mail server from outside...how can i do this in POSTFIX???

Thanking you, sadiq Ali.

share|improve this question

2 Answers 2

You need to implement SMTP auth. Here is a good howto

main.cf:

 smtpd_sasl_auth_enable = yes
 smtpd_sasl_local_domain = myserver
 broken_sasl_auth_clients = yes
 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject
share|improve this answer
    
+1 Agreed... Setting up as an open relay is not the answer, just setup SMTP AUTH and you can send through your server from anywhere simply by authenticating yourself. –  Jeremy Bouse Oct 1 '09 at 12:23

I would strongly consider setting up some kind of relaying via a VPN or SSH redirection so you don't need to relay from 0.0.0.0. That's opening a whole can of worms for the possibility of becoming a relay for others accidentally.

For example, if you're using a notebook computer, you could set up SSH to redirect local ports on the notebook to your SSH server on your home system, then you just run SSH first to create the redirects then configure your local mail client to connect to localhost for sending and getting mail. All traffic is encrypted between you and your server.

Or install and configure a VPN client on the server and notebook to connect to your home network.

There are bootable environments that you can take with you if you are looking at using computers from other locations that you don't own if you need to do some "custom" access from systems that aren't yours, depending on the situation, or you can set up a form of webmail to be served off your computer so you aren't exposing the mail server itself to remote relaying, you'd be doing it all from your webmail interface.

share|improve this answer
    
An SSH tunnel also has the advantage that the transfer can be compressed; often 8-bit messages and attachments are encoded as base64, and gzip can deal with that (6 point something bits per digit); plain text/html parts are even more compressible. –  ΤΖΩΤΖΙΟΥ Oct 3 '09 at 20:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.