I'm having problems with my mail server, I have been using as smtp relay, how can I prevent sending email on port 25 and at the same time able to receive mail on port 25?
Thanks a lot.
Firstly, you don't even say what software you are using - we can only guess that you are using Postfix as you are asking here. Secondly, this is not a general Postfix help forum - it is for support of the Postfix Admin package which is a tool for managing virtual mailboxes using postfix. You will find help resources over at postfix.org.
However, before you go over there, you need to formulate a request that makes sense. You need to state what software you are using, and what your problems are - "I have problems" is not a useful description ! Also, specify what "send" and "receive" mean - is that from the point of view of the server, or from <things> connecting to it ?
Anyway, I'll have a guess at what you mean. You have a mail server, you want to be able to send and receive your own mail through it, but you want to prevent other people sending mail through it (spammers using it as an open relay). Is that somewhere near the question ?
The usual way to deal with this is apply relay restrictions within the Postfix config - mostly using "smtpd_sender_restrictions". If you only need to be able to send from within you own network then you can use IP address based controls (including terms like "permit_mynetworks"). If you want to be able to send from outside you own network, then setting up SASL authentication is probably the easiest way to do it.