Port 25 needs to be open in order for it to receive mail from the internet. All mail servers will establish a connection on port 25 and initiate TLS (encryption) on that port if necessary.
Secure SMTP (port 465) is used only by clients connecting to your server in order to send mail out.
Port 587 is considered a submission port. It is also what clients use to send mail out using your server. Port 587 is preferred in SMTP settings of clients over port 25 because port 25 is blocked by many ISPs. If you have port 465 open, you don't necessarily need port 587 open as well, but I believe 587 is considered a standard and 465 is considered legacy.
Port 25 should accept anonymous connections, but not for relaying
Ports 465 and 587 should reject anonymous connections and allow relaying.
Don't apologize for not knowing. We all start somewhere, and nobody on here knows everything :-)
Does this mean that each time I switch from one mobile antenna to the next
(say i'm driving down the road) my phone will send a new IMAP IDLE command
to my dovecot server saying "Hey, my contact address has changed,
please use this one".
NO - IP Connectivity
You phone is communicating with the cell masts using a different protocol stack from the TCP/IP stack you use to make "data" connections to the Internet (such as the s7 stack). As you roam from cell mast to mast, the IP stack is ignorant of the changes. Your phone is still using the same IP (usually) all the time (unless you travel a long way, not just down the road the the next mast, to somewhere you carrier has allocated a separate geographic IP bloack).
NO - Single default route
What happens when you are using both WIFI and 3G? Does your phone
issue two IMAP IDLE commands?
No, your phone will only be using one of them to send/receive data on the Internet (unless you have some magical load balancing phone, I've never seen one, but hey, we can't all have seen everything!). It will pick a preferred one and install a default route into it's routing table via that medium (typically wifi of course).
Finally, do all mobile phones (with a data plan) have unique IP addresses?
NO - There's a shortage "ya" know ;)
This is very rare indeed, in fact I have never seen it only heard of it. So I don't believe it still. Giving each mobile user a public IP would be far to wasteful, the same as giving every computer in your house a public IP. You likely have as many Internet capable mobiles in your house as you do PCs. With one wifi AP they can all share 1 IP. No-brainer for "typical" home use.
If not (say the telco NATs you) how can my imap server initiate a
communication to my device?
Single Port/UPNP - You don't need "full" IP visibility
In order for your phone to communicate with your server (over IMAP) you will connect to TCP port 143 (or possibly 993 if you are wise) from a random outgoing port number above 1024 on your mobile. The NAT device at the carrier can create a NAT state table entriy in their GCN device mapping your phones private IP and source port to your servers public IP and port number. This will explain NAT further. Essentially though, you only need to connect to one port, which is quite simple for NAT. Another option such as that often used in home routers is UPnP forwarding but this is unlikely used at the carrier level.
To Wrap Up - IP Changes
So, when you are constantly on 3G, as you roam from cell to cell or mast to mast, your private IP between you and the carrier might change but your public IP talking to your IMAP server should stay the same so the IMAP connection should stay active. If you change public IP mapping, the worst that can happen is that the IMAP server doesn't recognize the IDLE prompt to keep the connection alive, as it doesn't recognize this as the already authenticated session, so assuming your IMAP username and password are saved to you phone, it should simply re-authenticate from your new public IP (phone and mail app dependent, but this is the behavior I find 9/10 times).
The same should be true if you connect to a wireless access point. If the IMAP server has a strop you will just re-authenticate from your new IP and carry on as normal.
Best Answer
Try following the Ubuntu Server Guide's chapter on Postfix.
Also the standard documentation of Postfix (especially the Basic Configuration and Standard Configuration Examples READMEs) is written quite well and understandable.