Friday, October 24, 2014

Postfix SPAM BUG

Postfix Bug

Sometimes you think that 2+3 =5 and 3+2 you will get also 5. But on point of  view of programmer, you will get differents answers.


One of my servers was under attack, i realize  because  i have a lot of traffic. I got some calls, the system is broken,  slow.....

I got into the server   and nothing wrong. But the calls were up. The second time, when i was in the server, i find something wrong. What i see, a new user lol....  i mean, the email xyz@mydomain.com  was sending a bulk emails to comcast.

The xyz@mydomian.com doesn't  exist, but postfix dont realize about it. if you are using sender controller over postfix, you have to know this bug.


My old main.cf was

smtpd_recipient_restrictions =
 permit_mynetworks,
 permit_sasl_authenticated,
 reject_sender_login_mismatch,
 reject_unauth_destination,
 reject_unlisted_recipient,
 reject_invalid_hostname,
 reject_unauth_pipelining,
         reject_invalid_hostname,
         reject_unknown_recipient_domain,
         reject_unauth_pipelining,
 reject_unknown_sender_domain,
 reject_non_fqdn_recipient,
 reject_non_fqdn_sender,


I spend all day and i see that it was a bug, very simple to fix only change the lines. Now only pepelupe can send email by pepelupe@mydomian( no more xyz@mydomain)

smtpd_recipient_restrictions =
 permit_mynetworks,
 reject_sender_login_mismatch,
 permit_sasl_authenticated,
 reject_unauth_destination,
 reject_unlisted_recipient,
 reject_invalid_hostname,
 reject_unauth_pipelining,
         reject_invalid_hostname,
         reject_unknown_recipient_domain,
         reject_unauth_pipelining,
 reject_unknown_sender_domain,
 reject_non_fqdn_recipient,
 reject_non_fqdn_sender,


i hope that no  one have to waste time with it.

Tuesday, October 21, 2014

Lets talk about Interprocess Communication


An Overview of RMI Applications

RMI applications often comprise two separate programs, a server and a client. A typical server program creates some remote objects, makes references to these objects accessible, and waits for clients to invoke methods on these objects. A typical client program obtains a remote reference to one or more remote objects on a server and then invokes methods on them. RMI provides the mechanism by which the server and the client communicate and pass information back and forth. Such an application is sometimes referred to as a distributed object application.
Distributed object applications need to do the following:
  • Locate remote objects. Applications can use various mechanisms to obtain references to remote objects. For example, an application can register its remote objects with RMI's simple naming facility, the RMI registry. Alternatively, an application can pass and return remote object references as part of other remote invocations.
  • Communicate with remote objects. Details of communication between remote objects are handled by RMI. To the programmer, remote communication looks similar to regular Java method invocations.
  • Load class definitions for objects that are passed around. Because RMI enables objects to be passed back and forth, it provides mechanisms for loading an object's class definitions as well as for transmitting an object's data.