# Postfix and maillog



## ZOleg (Oct 27, 2014)

How to do so Postfix does not write to maillog records like:

```
Oct 25 00:00:47 ns postfix/smtpd[2529]: connect from hostname.domain.local[10.10.1.253]
Oct 25 00:00:47 ns postfix/smtpd[2529]: lost connection after UNKNOWN from hostname.domain.local[10.10.1.253]
Oct 25 00:00:47 ns postfix/smtpd[2529]: disconnect from hostname.domain.local[10.10.1.253]
```

I do not need to see the logs of the domain hosts from domain.local.


----------



## ShelLuser (Oct 27, 2014)

Although I can't be 100% sure I still don't think this is possible. The thing is; Postfix doesn't provide much logfile control, also because it's common to log everything it does.

The only option I'm aware of which can influence the way things are logged is debug_peer_list (specified a list of domains) and debug_peer_level. However, this does the opposite of what you want; it allows you to _increase_ the information being logged for a specific domain.

Perhaps you can use a negative number to decrease the amount of information logged but to be honest I seriously doubt that.


----------



## ZOleg (Oct 27, 2014)

Ok, I found a temporary solution:

```
grep -v -e "hostname.domain.local" maillog>maillog.temp
```


----------

