under /var/log , we can see the following maillog files

-rw-------   1 root      root      11733421 Aug  5 03:47 maillog-20180805
-rw-------   1 root      root      15566137 Aug 13 03:16 maillog-20180813
-rw-------   1 root      root      11155484 Aug 19 15:37 maillog-20180819
-rw-------   1 root      root      14527085 Aug 27 03:37 maillog-20180827
-rw-------   1 root      root       6970662 Aug 30 17:25 maillog

we want to use the log maillog , by send some messages from cronjob

for example

how to send the message "454 wsp files was deleted"

to maillog file ?

so the line 454 wsp files was deleted will be in maillog file

my goal is to use the maillog file , instead to create another new logfile under /var/log

closed as unclear what you're asking by sebasth, steve, msp9011, G-Man, countermode Aug 31 '18 at 7:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Without knowing the details of your system, I would suggest something along the lines of logger -p mail.warning 454 esp files was deleted. Adjust the level as needed to get logged into your files.

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