Could postmfix exe get the parameter from a shell script?

Hi, Dear all,

I am using postmfix.exe to get some data. But I have to interact with postmfix through the screen and keyboard. If I need a lot of same operation, could I write a shell script to do this (or other type script)? Or it is impossible to implement this at all.

Thanks for any information.
Leina

You can pipe the content of a file into post_mfix. Each line of the file is a input you would normally type when interacting with post_mfix.

For example, say the file post.script contains the following:

HOPPER
1
T
3
4
0, 0.0203 
Y
EP_g
3
20, 20 
2,61
N
1,1
POST_EP_g_1.dat
0, 0.0203 
Y
ROP_s
1
3
20, 20
2,61
N
1,1
POST_ROP_s_1.dat
q
0 

Then you could pipe its content to automate post_mfix:

post_mfix < post.script